[issue39939] PEP 616: Add str.removeprefix and str.removesuffix methods

2020-05-27 Thread Elazar Gershuni
Change by Elazar Gershuni : -- nosy: +elazar nosy_count: 8.0 -> 9.0 pull_requests: +19726 pull_request: https://github.com/python/cpython/pull/20473 ___ Python tracker <https://bugs.python.org/issu

[issue29357] New NamedTuple syntax silently ignores method definitions

2017-01-23 Thread Elazar Gershuni
New submission from Elazar Gershuni: The following does not work as expected: ``` from typing import NamedTuple class A(NamedTuple): a: int def __repr__(self): return 'some A' def spam(self): print('spam!') >>> a = A(5) >>>

[issue19235] Add a dedicated subclass for recursion errors

2015-06-18 Thread Elazar Gershuni
Elazar Gershuni added the comment: Well that's a déjà vu. -- ___ Python tracker <http://bugs.python.org/issue19235> ___ ___ Python-bugs-list mailing list

[issue19235] Add a dedicated subclass for recursion errors

2015-06-18 Thread Elazar Gershuni
Elazar Gershuni added the comment: So what holds it back now? -- ___ Python tracker <http://bugs.python.org/issue19235> ___ ___ Python-bugs-list mailing list Unsub

[issue19235] Add a dedicated subclass for recursion errors

2015-05-30 Thread Elazar Gershuni
Elazar Gershuni added the comment: Ok -- ___ Python tracker <http://bugs.python.org/issue19235> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22975] Crosses initialization?

2014-12-01 Thread Elazar Gershuni
Changes by Elazar Gershuni : -- hgrepos: -282 ___ Python tracker <http://bugs.python.org/issue22975> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22975] Crosses initialization?

2014-12-01 Thread Elazar Gershuni
New submission from Elazar Gershuni: In Objects/unicodeobject.c, What happens in these lines? case PyUnicode_4BYTE_KIND: { \ Py_UCS4 * to_ = (Py_UCS4 *)((data)) + (start); \ for (; i_ < (length); ++i_, ++to_) *to_ = (value); \ break; \ defa

[issue22975] Crosses initialization?

2014-12-01 Thread Elazar Gershuni
Elazar Gershuni added the comment: https://hg.python.org/cpython/file/62a058c76869/Objects/unicodeobject.c#l9884 -- ___ Python tracker <http://bugs.python.org/issue22

[issue19235] Add a dedicated subclass for recursion errors

2014-03-06 Thread Elazar Gershuni
Elazar Gershuni added the comment: Is it going to be committed? -- ___ Python tracker <http://bugs.python.org/issue19235> ___ ___ Python-bugs-list mailin

[issue20733] Typo in itertools docs - "itertool-functions"

2014-02-22 Thread Elazar Gershuni
Elazar Gershuni added the comment: "itertools" is not English, but the name of the Python library. So it is not plural, and not a matter of choice of English phrasing. In addition, as a section name, it should be "Functions" with a capital F, just like "Itertools

[issue20733] Typo in itertools docs - "itertool-functions"

2014-02-22 Thread Elazar Gershuni
New submission from Elazar Gershuni: typo - should be "itertools-functions" instead of "itertool-functions" http://docs.python.org/3.4/library/itertools.html#itertool-functions -- assignee: docs@python components: Documentation messages: 211950 nosy: docs@pyt

[issue19235] Add a dedicated subclass for recursion errors

2013-10-20 Thread Elazar Gershuni
Elazar Gershuni added the comment: Looks good to me. Is it possible to add it to 2.7? I think it won't break any PEP8-following code (e.g. not testing for type equality/identity) -- ___ Python tracker <http://bugs.python.org/is

[issue19235] Add a dedicated subclass for recursion errors

2013-10-12 Thread Elazar Gershuni
Changes by Elazar Gershuni : -- nosy: +georg.brandl ___ Python tracker <http://bugs.python.org/issue19235> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19235] Add a dedicated subclass for recursion errors

2013-10-12 Thread Elazar Gershuni
New submission from Elazar Gershuni: There's no dedicated StackOverflowErrorException, So there is no way to accurately distinguish a recursion overflow from a general RuntimeError. One cannot use the exception message, since the docs explicitly says that "Exception messages are n

[issue19200] grammar in forkserver docs

2013-10-08 Thread Elazar Gershuni
New submission from Elazar Gershuni: in http://docs.python.org/3.4/library/multiprocessing.html#start-methods for `forkserver`: "whenever a new process is need the parent process connects to the server and requests that it fork a new process." replace "need

[issue13107] Text width in optparse.py can become negative

2013-09-11 Thread Elazar Gershuni
Elazar Gershuni added the comment: ok. how about argparse_ugly.patch? below some width it simply won't do any wrapping. (I hadn't touch optparse yet) -- Added file: http://bugs.python.org/file31731/argparse_ugly.patch ___ Python trac

[issue18980] Docs: enum - ReST format

2013-09-08 Thread Elazar Gershuni
New submission from Elazar Gershuni: in http://docs.python.org/3.4/library/enum.html : "..note: Nomenclature" and ".:meth:__format__" visible in the html. -- assignee: docs@python components: Documentation files: enum_minor.patch keywords: patch messages: 1973

[issue18908] Enum docs: sections leak out

2013-09-02 Thread Elazar Gershuni
Changes by Elazar Gershuni : Added file: http://bugs.python.org/file31564/enumplusminor.patch ___ Python tracker <http://bugs.python.org/issue18908> ___ ___ Python-bug

[issue18908] Enum docs: sections leak out

2013-09-02 Thread Elazar Gershuni
Changes by Elazar Gershuni : Removed file: http://bugs.python.org/file31563/enumplusminor.patch ___ Python tracker <http://bugs.python.org/issue18908> ___ ___ Python-bug

[issue18908] Enum docs: sections leak out

2013-09-02 Thread Elazar Gershuni
Changes by Elazar Gershuni : Added file: http://bugs.python.org/file31563/enumplusminor.patch ___ Python tracker <http://bugs.python.org/issue18908> ___ ___ Python-bug

[issue18908] Enum docs: sections leak out

2013-09-02 Thread Elazar Gershuni
Changes by Elazar Gershuni : Added file: http://bugs.python.org/file31562/enumindent.patch ___ Python tracker <http://bugs.python.org/issue18908> ___ ___ Python-bug

[issue18908] Enum docs: sections leak out

2013-09-02 Thread Elazar Gershuni
New submission from Elazar Gershuni: Inner sections "leak" out from enum to the general datatypes index: http://docs.python.org/3.4/library/datatypes.html (sections 8.14 - 8.17) -- assignee: docs@python components: Documentation messages: 196816 nosy: docs@python, elaza

[issue18908] Enum docs: sections leak out

2013-09-02 Thread Elazar Gershuni
Elazar Gershuni added the comment: here's a patch. -- keywords: +patch Added file: http://bugs.python.org/file31561/enumcontain.patch ___ Python tracker <http://bugs.python.org/is

[issue13107] Text width in optparse.py can become negative

2013-09-01 Thread Elazar Gershuni
Elazar Gershuni added the comment: I think in such case it is reasonable to fail silently, since the information will not be readable anyway. Is a patch like the attached acceptable? (Sorry, I am new here) results: >>> import os, argparse; p = argparse.ArgumentParser(p

[issue18077] dis.dis throws IndexError

2013-05-28 Thread Elazar Gershuni
Elazar Gershuni added the comment: If you pass 'None' for `path`, then "'NoneType' object has no attribute 'endswith'" is not as nearly as obscure. But if you insist not to fix it, and don't mind to leave another arbitrary inconsistency between

[issue18077] dis.dis raises IndexError

2013-05-28 Thread Elazar Gershuni
Changes by Elazar Gershuni : -- title: dis.dis throws IndexError -> dis.dis raises IndexError ___ Python tracker <http://bugs.python.org/issue18077> ___ ___ Py

[issue18077] dis.dis throws IndexError

2013-05-28 Thread Elazar Gershuni
Elazar Gershuni added the comment: Is it standard procedure to raise an unrelated exception in when an invalid parameter is passed? I did not encounter any other library function that behaves like this. Especially taking the fact that this is the normal usage in python3. How do I supposed

[issue18077] dis.dis throws IndexError

2013-05-27 Thread Elazar Gershuni
Elazar Gershuni added the comment: it happens that: (code, i) == ('pass', 4) -- ___ Python tracker <http://bugs.python.org/issue18077> ___ ___ Python-b

[issue18077] dis.dis throws IndexError

2013-05-27 Thread Elazar Gershuni
New submission from Elazar Gershuni: >>> dis.dis('pass') Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.7/dis.py", line 45, in dis disassemble_string(x) File "/usr/lib/python2.7/dis.py", line 112, i

[issue17287] slice inconsistency

2013-02-24 Thread Elazar Gershuni
New submission from Elazar Gershuni: slice behavior is not consistent for negative lower or upper arguments, which could be surprising: >>> 'hello'[:-2] 'hel' >>> 'hello'[:-1] 'hell' >>> 'hello'[:-0] ''