[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) >>> repr(a) # should

[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 rep...@bugs.python.org http://bugs.python.org/issue19235 ___ ___ Python-bugs-list

[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 rep...@bugs.python.org http://bugs.python.org/issue19235 ___ ___ Python-bugs-list mailing

[issue19235] Add a dedicated subclass for recursion errors

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

[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 rep...@bugs.python.org http://bugs.python.org/issue22975

[issue22975] Crosses initialization?

2014-12-01 Thread Elazar Gershuni
Changes by Elazar Gershuni elaz...@gmail.com: -- hgrepos: -282 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22975 ___ ___ Python-bugs-list

[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; \ default

[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 rep...@bugs.python.org http://bugs.python.org/issue19235 ___ ___ Python-bugs-list

[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@python, elazar priority: normal

[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 Recipes down there. http

[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 rep...@bugs.python.org http://bugs.python.org

[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 not part

[issue19235] Add a dedicated subclass for recursion errors

2013-10-12 Thread Elazar Gershuni
Changes by Elazar Gershuni elaz...@gmail.com: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19235 ___ ___ Python-bugs-list

[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 with needed, . -- assignee

[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 tracker rep

[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: 197312 nosy: docs@python, elazar

[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, elazar priority: normal

[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 rep...@bugs.python.org http://bugs.python.org/issue18908

[issue18908] Enum docs: sections leak out

2013-09-02 Thread Elazar Gershuni
Changes by Elazar Gershuni elaz...@gmail.com: Added file: http://bugs.python.org/file31562/enumindent.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18908

[issue18908] Enum docs: sections leak out

2013-09-02 Thread Elazar Gershuni
Changes by Elazar Gershuni elaz...@gmail.com: Added file: http://bugs.python.org/file31563/enumplusminor.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18908

[issue18908] Enum docs: sections leak out

2013-09-02 Thread Elazar Gershuni
Changes by Elazar Gershuni elaz...@gmail.com: Added file: http://bugs.python.org/file31564/enumplusminor.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18908

[issue18908] Enum docs: sections leak out

2013-09-02 Thread Elazar Gershuni
Changes by Elazar Gershuni elaz...@gmail.com: Removed file: http://bugs.python.org/file31563/enumplusminor.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18908

[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(prog='PROG') os.environ

[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 raises IndexError

2013-05-28 Thread Elazar Gershuni
Changes by Elazar Gershuni elaz...@gmail.com: -- title: dis.dis throws IndexError - dis.dis raises IndexError ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18077

[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 python2 and python3 obscured, I have nothing more

[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 stdin, line 1, in module File /usr/lib/python2.7/dis.py, line 45, in dis disassemble_string(x) File /usr/lib/python2.7/dis.py, line 112, in disassemble_string labels = findlabels(code

[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 rep...@bugs.python.org http://bugs.python.org/issue18077 ___ ___ Python

[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] '' this is obvious when written as literal, but not so obvious when using variables in expressions