[issue42233] GenericAlias does not support union type expressions

2021-11-21 Thread Dávid Nemeskey
Dávid Nemeskey added the comment: @kj Sorry, for some reason, I thought the that issue affected Union as well, but I have just re-tested it and found that it works. -- ___ Python tracker <https://bugs.python.org/issue42

[issue42233] GenericAlias does not support union type expressions

2021-11-19 Thread Dávid Nemeskey
Dávid Nemeskey added the comment: Guys, any chance the fix will land in 3.9? It is affected as well. -- nosy: +nemeskeyd ___ Python tracker <https://bugs.python.org/issue42

[issue45271] Add a 'find' method (a'la str) to list

2021-09-23 Thread Dávid Nemeskey
Change by Dávid Nemeskey : -- type: -> enhancement ___ Python tracker <https://bugs.python.org/issue45271> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue45271] Add a 'find' method (a'la str) to list

2021-09-23 Thread Dávid Nemeskey
New submission from Dávid Nemeskey : There is an unjustified asymmetry between `str` and `list`, as far as lookup goes. Both have an `index()` method that returns the first index of a value, or raises a `ValueError` if it doesn't exist. However, only `str` has the `find` method, which returns

[issue39816] More descriptive error message than "too many values to unpack"

2021-09-02 Thread Dávid Nemeskey
Dávid Nemeskey added the comment: +1. When starting out, I always got confused about this message ("too many values to unpack? Does that mean my function returned too many items, which could not be unpacked into the expected number? Oh no, the opposite..."). Also, please note that

[issue43306] Error in multiprocessing.Pool's initializer doesn't stop execution

2021-02-23 Thread Dávid Nemeskey
New submission from Dávid Nemeskey : There is an inconsistency in how multiprocessing.Pool handles exceptions thrown in the workers: - exceptions raised by the mapped function stop execution right away - exceptions raised in an initializer are ignored and the pool continues spawning new

[issue42956] Easy conversion between range and slice

2021-01-18 Thread Dávid Nemeskey
Dávid Nemeskey added the comment: s/to different/two different/ -- ___ Python tracker <https://bugs.python.org/issue42956> ___ ___ Python-bugs-list mailin

[issue42956] Easy conversion between range and slice

2021-01-18 Thread Dávid Nemeskey
New submission from Dávid Nemeskey : It would be nice if there was an easy way to convert a range to a slice and vice versa. At least superficially the two are almost the same(*), yet if one wants to convert a slice to a range, he has to go through hoops to avoid potential errors, ending up

[issue36664] argparse: parser aliases in subparsers stores alias in dest variable

2019-10-31 Thread Dávid Nemeskey
Dávid Nemeskey added the comment: I ran into the same problem. I know of the set_defaults() method, in fact, that is what I have always been using. But why was dest added if not to provide a better solution? I agree that changing it would _perhaps_ break some code, so I agree

[issue35786] get_lock() method is not present for Values created using multiprocessing.Manager()

2019-08-07 Thread Dávid Nemeskey
Dávid Nemeskey added the comment: OK, actually: trying to create a multiprocessing.Value object and sharing it between a Pool of processes results in "RuntimeError: Synchronized objects should only be shared between processes through inheritance". So the only way seems to

[issue35786] get_lock() method is not present for Values created using multiprocessing.Manager()

2019-08-07 Thread Dávid Nemeskey
Dávid Nemeskey added the comment: Nothing in the documentation says that multiprocessing.Value and the object returned by manager.Value() is any different. Nor is it clear why they should be. It is perfectly understandable to expect that manager.Value() is actually of type

[issue36271] '_io.TextIOWrapper' object has no attribute 'mode'

2019-03-12 Thread Dávid Nemeskey
Dávid Nemeskey added the comment: Note that this is not the same as GZipFile.mode, which is 1 or 2 (READ or WRITE), instead of the more informative "[raw][bt ]". -- ___ Python tracker <https://bugs.python.o

[issue36271] '_io.TextIOWrapper' object has no attribute 'mode'

2019-03-12 Thread Dávid Nemeskey
New submission from Dávid Nemeskey : TextIOWrapper objects returned by gzip.open() or bz2.open() do not have the 'mode' data member. Those returned by io.open() do. It would be nice if it did. -- components: Library (Lib) messages: 337745 nosy: nemeskeyd priority: normal severity

[issue30471] "as" keyword in comprehensions

2017-05-26 Thread Dávid Nemeskey
Dávid Nemeskey added the comment: The truth is, I was thinking about going to the list, but according to PEP 42 (https://www.python.org/dev/peps/pep-0042/), this space was one of the places new features could be requested: """ Note This PEP has been rejected as obsolete.

[issue30471] "as" keyword in comprehensions

2017-05-25 Thread Dávid Nemeskey
New submission from Dávid Nemeskey: Currently, the "as" keyword in supported in import and with statements to bind an object to a name. I think it would be nice to have the same functionality in list/dict/etc. comprehensions as well. Rationale: as I understand, comprehensions are