@@ -19,6 +19,11 @@ formatted string. All names wrapped inside the curly braces ({}) are resolved
19
19
with the value of variable available in local scope. If the variable isn’t found
20
20
in the local scope then it will raise a ``` NameError ``` exception.
21
21
22
+ TODO: ADD below things
23
+ 1 . Multiline Fstring
24
+ 2 . FString by calling function or class methods
25
+ 3 . Fstring as dictionary key
26
+ 4 . Fstring by using capital 'F'.
22
27
23
28
### Demonstration
24
29
@@ -31,9 +36,6 @@ name = "Jay"
31
36
print (f " Hello { name} " )
32
37
```
33
38
34
- [ TODO: Find, Are there any tool avilable to convert all a formatted strings to
35
- Fstrings?]
36
-
37
39
In my view, this option of string formation is more concise and readable than
38
40
all other options. I advise migrating your code to Fstrings if your Python
39
41
interpreter is greater than or equal to version 3.6. You should note that
@@ -46,10 +48,10 @@ depreciate in the near future.
46
48
47
49
* Fstring can be elaborated as "Formatted String".
48
50
49
- * Variable is always resolved at local scope. If it isn' t found then it will
50
- rise the ``` NameError ``` exception.
51
+ * Variable is always resolved at a local scope. If it isn’ t found then it will
52
+ raise the ``` NameError ``` exception.
51
53
52
54
* You can format your strings by Fstring approach only if your Python
53
55
interpreter version is greater than or equal to 3.6.
54
56
55
- * Existing string formation approches are not subjected to depricate soon.
57
+ * Existing string formation approaches are not subjected to deprecate soon.
0 commit comments