[issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings.

2019-07-26 Thread Kirill Balunov
Kirill Balunov added the comment: I am reading "equivalence" too strictly (like "as a substitute"), because this is part of the documentation :) and I agree that in ordinary speech I would use it rather in the sense of “similar”. In order to make sure, that

[issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings.

2019-07-26 Thread Kirill Balunov
Kirill Balunov added the comment: I understand the reasons, I only say that it does not correspond to my perception of their equivalence, because: os.path.isdir('') != os.path.isdir('.') while: Path('').is_dir() == Path('.').is_dir() and I can confirm that some libraries rely

[issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings.

2019-07-26 Thread Kirill Balunov
Kirill Balunov added the comment: Forgot to write the result for Path variant: >>> Path(dummy).is_dir() True -- ___ Python tracker <https://bugs.python.or

[issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings.

2019-07-26 Thread Kirill Balunov
New submission from Kirill Balunov : In the documentation it is said that os.path.isdir(...) an Path(...).is_dir()are equivalent substitutes. https://docs.python.org/3/library/pathlib.html#correspondence-to-tools-in-the-os-module But they give different result for empty path strings

[issue33326] Convert collections (cmp_op, hasconst, hasname and others) in opcode module to more optimal type

2018-04-26 Thread Kirill Balunov
Kirill Balunov <kirill.balu...@gmail.com> added the comment: I apologize for FutureWarning and __getattr__. I myself do not understand what I meant and how it will help in this situation :) -- ___ Python tracker <rep...@bugs.python.or

[issue33326] Convert collections (cmp_op, hasconst, hasname and others) in opcode module to more optimal type

2018-04-26 Thread Kirill Balunov
Kirill Balunov <kirill.balu...@gmail.com> added the comment: Small risk of breaking is a fair point (maybe some FutureWarning with new __getattr__ PEP 562?). I've checked several packages: --- vstinner/bytecode:: uses: @staticmethod def _has_jump(opcode): return (

[issue33326] Convert collections (cmp_op, hasconst, hasname and others) in opcode module to more optimal type

2018-04-26 Thread Kirill Balunov
Change by Kirill Balunov <kirill.balu...@gmail.com>: -- nosy: +larry, serhiy.storchaka ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32455] PyCompile_OpcodeStackEffect() and dis.stack_effect() are not particularly useful

2018-04-26 Thread Kirill Balunov
Kirill Balunov <kirill.balu...@gmail.com> added the comment: Sorry if this doesn't fit this issue and needs a separate one. Since Python switched to 2 byte wordcode, all opcodes which do not imply an argument, technically have it - augmented with 0. So it is convenient to iterat

[issue33326] Convert collections (cmp_op, hasconst, hasname and others) in opcode module to more optimal type

2018-04-21 Thread Kirill Balunov
New submission from Kirill Balunov <kirill.balu...@gmail.com>: The opcode module contains several collections: `cmp_op` `hasconst` `hasname` `hasjrel` ... which are only used for `in` checks. At the same time, they are stored as `list`s and `cmp_op` as tuple. Both these types are not o

[issue27129] Wordcode, part 2

2018-04-13 Thread Kirill Balunov
Kirill Balunov <kirill.balu...@gmail.com> added the comment: Hello, what is the future of this patch? Such a feeling that the transition to wordcode is still in some half-way state. -- nosy: +godaygo ___ Python tracker <rep...@bugs.p

[issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used

2018-02-22 Thread Kirill Balunov
Kirill Balunov <kirill.balu...@gmail.com> added the comment: Yes, I agree, I did not understand the documentation correctly. It seems to me that the problem in the perception arose because of the fact that "deactivate" is not formatted as shell command, while `Deactivate

[issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used

2018-02-22 Thread Kirill Balunov
Kirill Balunov <kirill.balu...@gmail.com> added the comment: Sorry, `deactivate` works in both cases `Scripts/Activate.ps1` and `Scripts/activate`. Only `Deactivate.ps1` is not created for the former, but the docs says that it should. -- ___

[issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used

2018-02-22 Thread Kirill Balunov
New submission from Kirill Balunov <kirill.balu...@gmail.com>: There was a related issue, which was closed https://bugs.python.org/issue26715. If virtual environment was activated using Powershell script - Activate.ps1, the Deactivate.ps1 was not created, while the documentatio

[issue28685] Optimizing list.sort() by performing safety checks in advance

2018-01-28 Thread Kirill Balunov
Kirill Balunov <kirill.balu...@gmail.com> added the comment: What is the current status of this issue and will it go into Python 3.7? -- nosy: +godaygo ___ Python tracker <rep...@bugs.python.org> <https://bugs.python