[issue41284] High Level API for json file parsing
Change by Wansoo Kim : -- keywords: +patch pull_requests: +20601 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21453 ___ Python tracker <https://bugs.python.org/issue41284> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41284] High Level API for json file parsing
New submission from Wansoo Kim : Many Python users use the following snippets to read Json File. ``` with oepn(filepath, 'r') as f: data = json.load(f) ``` I suggest providing this snippet as a function. ``` data = json.read(filepath) ``` Reading Json is very frequent task for python users. I think it is worth providing this with the High Level API. -- components: Library (Lib) messages: 373552 nosy: ys19991 priority: normal severity: normal status: open title: High Level API for json file parsing versions: Python 3.10 ___ Python tracker <https://bugs.python.org/issue41284> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40982] copytree example in shutil
Wansoo Kim added the comment: Can I solve this issue? -- nosy: +ys19991 ___ Python tracker <https://bugs.python.org/issue40982> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41264] Do not use the name of the built-in function as a variable.
Change by Wansoo Kim : -- pull_requests: +20575 pull_request: https://github.com/python/cpython/pull/21428 ___ Python tracker <https://bugs.python.org/issue41264> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41264] Do not use the name of the built-in function as a variable.
Change by Wansoo Kim : -- keywords: +patch pull_requests: +20574 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21427 ___ Python tracker <https://bugs.python.org/issue41264> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41264] Do not use the name of the built-in function as a variable.
New submission from Wansoo Kim : Using the name of the built-in function as a variable can cause unexpected problems. ``` # example type = 'Hello' ... type('Happy') Traceback (most recent call last): File "", line 1, in TypeError: 'str' object is not callable ``` You can go back without any problems right now, but you may have problems later when others make corrections. This code can be returned without any problems right now, but it may cause problems later when others make a change. In the Lib/xml/etree function/_default, assign a value for the type. ``` ... type = self._doctype[1] if type == "PUBLIC" and n == 4: name, type, pubis, system = self._doctype ... ``` -- messages: 373442 nosy: ys19991 priority: normal severity: normal status: open title: Do not use the name of the built-in function as a variable. type: enhancement ___ Python tracker <https://bugs.python.org/issue41264> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37578] Change Glob: Allow Recursion for Hidden Files
Wansoo Kim added the comment: Can you reproduce this bug? I was able to find the hidden file by recursive search by excuting the code below. ``` from glob import glob hidden = glob('**/.*') print(hidden) ``` -- nosy: +ys19991 ___ Python tracker <https://bugs.python.org/issue37578> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37894] [win] shutil.which can not find the path if 'cmd' include directory path and not include extension name
Wansoo Kim added the comment: Can I solve this problem? -- nosy: +ys19991 ___ Python tracker <https://bugs.python.org/issue37894> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41199] Docstring convention not followed for dataclasses documentation page
Change by Wansoo Kim : -- keywords: +patch pull_requests: +20562 pull_request: https://github.com/python/cpython/pull/21413 ___ Python tracker <https://bugs.python.org/issue41199> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41199] Docstring convention not followed for dataclasses documentation page
Wansoo Kim added the comment: May I solve this issue? -- nosy: +ys19991 ___ Python tracker <https://bugs.python.org/issue41199> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41242] When concating strings, I think it is better to use += than join the list
Wansoo Kim added the comment: Well... to be honest, I'm a little confused. bpo-41244 and this issue are completely opposite. I'm not used to Python community yet because it hasn't been long since I joined it. You're saying that if a particular method is not dramatically good, we prefer to keep the existing one as it is, right? Your comment was very helpful to me. Maybe I can learn one by one like this. Thank you very much. -- ___ Python tracker <https://bugs.python.org/issue41242> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41244] Change to use str.join() instead of += when concatenating string
Change by Wansoo Kim : -- keywords: +patch pull_requests: +20546 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21398 ___ Python tracker <https://bugs.python.org/issue41244> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41244] Change to use str.join() instead of += when concatenating string
New submission from Wansoo Kim : https://bugs.python.org/issue41242 According to BPO-41242, it is better to use join than += when concatenating multiple strings. https://github.com/python/cpython/blob/b26a0db8ea2de3a8a8e4b40e69fc8642c7d7cb68/Lib/asyncio/queues.py#L82 However, the link above uses += in the same pattern. I think we'd better change this to `str.join()` -- components: asyncio messages: 373317 nosy: asvetlov, ys19991, yselivanov priority: normal severity: normal status: open title: Change to use str.join() instead of += when concatenating string type: enhancement ___ Python tracker <https://bugs.python.org/issue41244> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41242] When concating strings, I think it is better to use += than join the list
Change by Wansoo Kim : -- keywords: +patch pull_requests: +20545 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21397 ___ Python tracker <https://bugs.python.org/issue41242> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41242] When concating strings, I think it is better to use += than join the list
New submission from Wansoo Kim : Hello I think it's better to use += than list.join() when concating strings. This is more intuitive than other methods. Also, I personally think it is not good for one variable to change to another type during runtime. https://github.com/python/cpython/blob/b26a0db8ea2de3a8a8e4b40e69fc8642c7d7cb68/Lib/asyncio/base_events.py#L826 If you look at the link above, `msg` was a list type at first, in the end become a str type. -- components: asyncio messages: 373310 nosy: asvetlov, ys19991, yselivanov priority: normal severity: normal status: open title: When concating strings, I think it is better to use += than join the list type: enhancement ___ Python tracker <https://bugs.python.org/issue41242> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41241] Unnecessary Type casting in 'if condition'
Change by Wansoo Kim : -- keywords: +patch pull_requests: +20544 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21396 ___ Python tracker <https://bugs.python.org/issue41241> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41241] Unnecessary Type casting in 'if condition'
New submission from Wansoo Kim : Hello! When using 'if syntax', casting condition to bool type is unnecessary. Rather, it only occurs overhead. https://github.com/python/cpython/blob/b26a0db8ea2de3a8a8e4b40e69fc8642c7d7cb68/Lib/asyncio/futures.py#L118 If you look at the link above, the `val` has been cast to bool type. This works well without bool casting. This issue is my first issue. So if you have a problem, please tell me! Thanks You! -- components: asyncio messages: 373309 nosy: asvetlov, ys19991, yselivanov priority: normal severity: normal status: open title: Unnecessary Type casting in 'if condition' type: enhancement versions: Python 3.10 ___ Python tracker <https://bugs.python.org/issue41241> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41227] minor typo in asyncio transport protocol
Change by Wansoo Kim : -- keywords: +patch nosy: +ys19991 nosy_count: 4.0 -> 5.0 pull_requests: +20529 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21384 ___ Python tracker <https://bugs.python.org/issue41227> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com