[issue37147] f-string debugging f"{x=[}" adds [filename:lineno] as prefix

2019-06-04 Thread Aldwin Pollefeyt
Aldwin Pollefeyt added the comment: Can use: import logging l = logging.Logger("") h = logging.StreamHandler() f = logging.Formatter(fmt="[{filename}:{lineno}] {msg}", style="{") h.setFormatter(f) l.addHandler(h) l.info("Hello") Output: >py .\t.py [t.py:8] Hello -- resolution: ->

[issue37147] f-string debugging f"{x=[}" adds [filename:lineno] as prefix

2019-06-04 Thread Aldwin Pollefeyt
Aldwin Pollefeyt added the comment: Ok, didn't know about discuss.python.org. Searching on all PR and bpo's there was no reference to your hack. Will investigate this discuss.python.org. Ai ai ai, more info to read. -- ___ Python tracker

[issue37147] f-string debugging f"{x=[}" adds [filename:lineno] as prefix

2019-06-04 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I created a post about it for discussion [0]. There is no consensus on the format and to modify the existing debugging notation. There were also suggestions to include a builtin function (dbg) like breakpoint() that does this. I guess

[issue37147] f-string debugging f"{x=[}" adds [filename:lineno] as prefix

2019-06-04 Thread Aldwin Pollefeyt
Change by Aldwin Pollefeyt : -- keywords: +patch pull_requests: +13684 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13799 ___ Python tracker

[issue37147] f-string debugging f"{x=[}" adds [filename:lineno] as prefix

2019-06-04 Thread Aldwin Pollefeyt
New submission from Aldwin Pollefeyt : >From this idea [0] by Karthikeyan Singaravelan and added to his code in hack >[1]. name = "karthikeyan" print(f"{name =[}") print(f"{name=[}") print(f"{age = [}") print(f"{age= [}") [prog.py:2] name ='karthikeyan' [prog.py:3] name='karthikeyan'