Skip to content

[Bug] FString Critical #2447

@kugesan1105

Description

@kugesan1105

Critical Issue

Image Image
Image

jac code

with entry{
   
    person = dict(name="Alice", age=30, city="New York");
    print(f'{person!r}');
    name = "Alice";
    n = 42;
    price = 19.99;
    tax = 0.07;
    txt = "The price is {:.2f} dollars";
    print(txt.format(price));
    price = 59000;
    txt = f"The price is {price:,} dollars";
    print(txt);

    a = f"{n:#x}";
    b = f"{n:,}";
    c = f"{n:_}";
    d = f"{name:*^20}";
    e = f"{-42:=+6d}";
    f = f"The price is {20 * 59} dollars";
    g = f"{(lambda x: x**2)(7)}";
    h = f"The price is {price + (price * tax)} dollars";
    print(a, b, c, d, e, f, g, h);

    name = 'world';
    greeting_message = f'''hello >> {name}''';
    greeting_message = f'''hello 
                                >> {name}''';
    print(greeting_message);

    price = 59000;
    txt = f"The price is {price:,} dollars";
    print(txt);

}

python code

person = dict(name="Alice", age=30, city="New York")
print(f'{person!r}')
name = "Alice"
n = 42
price = 19.99
tax = 0.07
txt = "The price is {:.2f} dollars"
print(txt.format(price))
price = 59000
txt = f"The price is {price:,} dollars"
print(txt)

a = f"{n:#x}"
b = f"{n:,}"
c = f"{n:_}"
d = f"{name:*^20}"
e = f"{-42:=+6d}"
f = f"The price is {20 * 59} dollars"
g = f"{(lambda x: x**2)(7)}"
h = f"The price is {price + (price * tax)} dollars"

print(a, b, c, d, e, f, g, h)
name = 'world'
greeting_message = f'''hello 
                            >> {name}'''
print(greeting_message)

Sub-issues

Metadata

Metadata

Assignees

Labels

P0Critical issues or feature needs that must be addressed immediately.bugSomething isn't working as expected.

Type

Projects

Status

Completed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions