[issue44313] Generate LOAD_ATTR+CALL_FUNCTION instead of LOAD_METHOD+CALL_METHOD for imports

2021-07-01 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: New changeset 0d7f61ddb074659d8c18c8f5ac86a6a18e41f9e5 by Batuhan Taskaya in branch 'main': bpo-44313: bump up magic (#26983) https://github.com/python/cpython/commit/0d7f61ddb074659d8c18c8f5ac86a6a18e41f9e5 --

[issue44313] Generate LOAD_ATTR+CALL_FUNCTION instead of LOAD_METHOD+CALL_METHOD for imports

2021-07-01 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +25545 pull_request: https://github.com/python/cpython/pull/26983 ___ Python tracker ___

[issue44313] Generate LOAD_ATTR+CALL_FUNCTION instead of LOAD_METHOD+CALL_METHOD for imports

2021-07-01 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44313] Generate LOAD_ATTR+CALL_FUNCTION instead of LOAD_METHOD+CALL_METHOD for imports

2021-06-30 Thread Mark Shannon
Mark Shannon added the comment: New changeset 1b28187a0e3e914ee48de8032cbba0a965dd5563 by Batuhan Taskaya in branch 'main': bpo-44313: generate LOAD_ATTR/CALL_FUNCTION for top-level imported objects (GH-26677) https://github.com/python/cpython/commit/1b28187a0e3e914ee48de8032cbba0a965dd5563

[issue44313] Generate LOAD_ATTR+CALL_FUNCTION instead of LOAD_METHOD+CALL_METHOD for imports

2021-06-11 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: +patch pull_requests: +25263 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26677 ___ Python tracker ___

[issue44313] Generate LOAD_ATTR+CALL_FUNCTION instead of LOAD_METHOD+CALL_METHOD for imports

2021-06-10 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44313] Generate LOAD_ATTR+CALL_FUNCTION instead of LOAD_METHOD+CALL_METHOD for imports

2021-06-10 Thread Mark Shannon
Mark Shannon added the comment: Yes. Simpler is good. I think it will also be better for performance: In general, we don't know what X is in `from Y import X`. It could be a module or anything else. However, if we are accessing an attribute it is quite likely to be a module or class. For

[issue44313] Generate LOAD_ATTR+CALL_FUNCTION instead of LOAD_METHOD+CALL_METHOD for imports

2021-06-04 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: @mark.shannon what do you think about doing this both for `import ` and `from import `. It will definitely simplify the implementation (no need to extra visitors or flags, just using the default DEF_IMPORT one

[issue44313] Generate LOAD_ATTR+CALL_FUNCTION instead of LOAD_METHOD+CALL_METHOD for imports

2021-06-04 Thread Batuhan Taskaya
New submission from Batuhan Taskaya : import foo def func(): return foo.bar() The snippet above will generate the following code; 2 0 LOAD_GLOBAL 0 (foo) 2 LOAD_METHOD 1 (bar) 4 CALL_METHOD 0 6