[issue40616] Add `asyncio.BufferQueue`

2020-09-14 Thread Serge Matveenko
Change by Serge Matveenko : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue40616> ___ ___ Python-bugs-list

[issue33953] The DEFAULT_ENTROPY variable used to store the current default random bytes value should be documented for `secrets` module

2020-09-14 Thread Serge Matveenko
Change by Serge Matveenko : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue33953> ___ ___ Python-bugs-list

[issue38701] datetime.timedelta string representation is ambiguous

2020-09-14 Thread Serge Matveenko
Change by Serge Matveenko : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue38701> ___ ___ Python-bugs-list

[issue33953] The DEFAULT_ENTROPY variable used to store the current default random bytes value should be documented for `secrets` module

2020-05-14 Thread Serge Matveenko
Change by Serge Matveenko : -- versions: +Python 3.6 ___ Python tracker <https://bugs.python.org/issue33953> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33953] The DEFAULT_ENTROPY variable used to store the current default random bytes value should be documented for `secrets` module

2020-05-14 Thread Serge Matveenko
Change by Serge Matveenko : -- versions: +Python 3.9 ___ Python tracker <https://bugs.python.org/issue33953> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38701] datetime.timedelta string representation is ambiguous

2020-05-14 Thread Serge Matveenko
Serge Matveenko added the comment: I would be happy to submit a PR if there would be an agreement on the format. -- ___ Python tracker <https://bugs.python.org/issue38

[issue40616] Add `asyncio.BufferQueue`

2020-05-13 Thread Serge Matveenko
New submission from Serge Matveenko : It looks handy to be able to leverage `collections.deque` ability to be sized it `asyncio.Queue`. This could provide the ability to implement backpressure in the queue or just use it as a buffer in messaging systems. The implementation provided

[issue38701] datetime.timedelta string representation is ambiguous

2019-11-05 Thread Serge Matveenko
New submission from Serge Matveenko : Negative `timedelta` string representation is ambiguous. ``` >>> from datetime import datetime, timedelta >>> d2 = datetime.now() >>> d1 = d2 - timedelta(days=42, seconds=5) >>> str(d2 - d1) '42 days, 0:00:05' >>

[issue33953] The DEFAULT_ENTROPY variable used to store the current default random bytes value should be documented for `secrets` module

2018-06-25 Thread Serge Matveenko
New submission from Serge Matveenko : There is the corresponding section on the topic here https://github.com/python/cpython/blob/3.6/Doc/library/secrets.rst#how-many-bytes-should-tokens-use The current value of 32 bytes is mentioned there correctly. Unfortunately, there is no way to know

[issue25315] OrderedDict mangled private attribute is inaccessible

2015-10-07 Thread Serge Matveenko
Serge Matveenko added the comment: Sorry for reopening. I completely agree with the point that is it not necessary for Python and C implementations to duplicate each other. But then the Python OrderedDict implementation should be dropped from the library source. The code that is there now

[issue25315] OrderedDict mangled private attribute is inaccessible

2015-10-05 Thread Serge Matveenko
Serge Matveenko added the comment: Ok, then the OrderedDict is useless for any advanced hacking like altering the order in which __setitem__ stores items. It is just useless Python code and so much appliances missed for this class:( Thank you all for these completely helpful answers

[issue25315] OrderedDict mangled private attribute is inaccessible

2015-10-05 Thread Serge Matveenko
Serge Matveenko added the comment: Zach, ok I got your point. But there is Python implementation in the library still which does not conform the one done in C. Such a behavior is tremendously confusing. If there is both Python and C implementation in the library they must conform each other

[issue25315] OrderedDict mangled private attribute is inaccessible

2015-10-05 Thread Serge Matveenko
Serge Matveenko added the comment: If Python source does conform the one in C, it will be completely fine and understandable to have such a change and to rely on it in using version checks or whatever. -- ___ Python tracker <rep...@bugs.python.

[issue25315] OrderedDict mangled private attribute is inaccessible

2015-10-04 Thread Serge Matveenko (lig)
New submission from Serge Matveenko (lig): Consider this code in Python 3.5.0: Python 3.5.0 (default, Sep 26 2015, 14:59:25) [GCC 5.1.1 20150618 (Red Hat 5.1.1-4)] on linux Type "help", "copyright", "credits" or "license" for more information. >>&

Re: first of not None

2008-10-09 Thread Serge Matveenko
On 10/9/08, Serge Matveenko [EMAIL PROTECTED] wrote: I need to put in the var property of the first object from the list that is not None. Somth like: foo = first_of([any, beny, riki,]).name Dont want to ugly if-cascade: foo = any.name if name is not None else beny.name if beny is not None

first of not None

2008-10-09 Thread Serge Matveenko
is not None \ else riki.name if riki is not None -- Serge Matveenko mailto:[EMAIL PROTECTED] http://serge.matveenko.ru/ -- http://mail.python.org/mailman/listinfo/python-list