[issue19068] Some built-in complex docstrings are not PEP-8 compatible

2013-09-22 Thread Marco Buttu
New submission from Marco Buttu: As reported in the title: complex.conjugate.__doc__.splitlines()[-1] 'Returns the complex conjugate of its argument. (3-4j).conjugate() == 3+4j.' complex.__format__.__doc__.splitlines()[-1] 'Converts to a string according to format_spec.' They should have

[issue19068] Some built-in complex docstrings are not PEP-8 compatible

2013-09-22 Thread Marco Buttu
Changes by Marco Buttu marco.bu...@gmail.com: -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19068 ___ ___ Python-bugs-list

[issue19069] Built-in float docstrings are not PEP-8 compatible

2013-09-22 Thread Marco Buttu
New submission from Marco Buttu: As reported in the title: float.as_integer_ratio.__doc__.splitlines()[2] 'Returns a pair of integers, whose ratio is exactly equal to the original' float.as_integer_ratio.__doc__.splitlines()[4] 'Raises OverflowError on infinities and a ValueError on NaNs

[issue19054] Descriptors howto

2013-09-21 Thread Marco Buttu
Changes by Marco Buttu marco.bu...@gmail.com: Removed file: http://bugs.python.org/file31831/py3howto.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19054

[issue19054] Descriptors howto

2013-09-21 Thread Marco Buttu
Changes by Marco Buttu marco.bu...@gmail.com: Removed file: http://bugs.python.org/file31830/py2howto.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19054

[issue19054] Descriptors howto

2013-09-21 Thread Marco Buttu
Marco Buttu added the comment: I think the indentation is a problem, for several reasons. In all the examples in the documentation, the form by using the interactive shell is the following: class MyClass: ... pass otherwise: class MyClass: pass This one is awful

[issue19054] Descriptors howto

2013-09-21 Thread Marco Buttu
Changes by Marco Buttu marco.bu...@gmail.com: -- resolution: invalid - works for me status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19054

[issue19054] Descriptors howto

2013-09-21 Thread Marco Buttu
Marco Buttu added the comment: By looking at the other examples in the howto, I saw there is the same problem in all the definitions in the prompt, and furthermore, we are using a different number of spaces to indent MyClass respect the rest of the classes defined in the prompt

[issue19054] Descriptors howto

2013-09-21 Thread Marco Buttu
Changes by Marco Buttu marco.bu...@gmail.com: Removed file: http://bugs.python.org/file31834/py3full.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19054

[issue19054] Descriptors howto

2013-09-21 Thread Marco Buttu
Marco Buttu added the comment: You are right. Now it should be ok -- Added file: http://bugs.python.org/file31835/py3full.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19054

[issue19054] Descriptors howto

2013-09-21 Thread Marco Buttu
Marco Buttu added the comment: By the way, it does not pass all the tests in Python 2.7: $ python2.7 -m doctest descriptor_modified.rst | tail -n 1 ***Test Failed*** 3 failures. If we want to be very rigorous, in order to pass the tests in Py2.7 too (kipping the rst aligned between py2

[issue19054] Descriptors howto

2013-09-21 Thread Marco Buttu
Marco Buttu added the comment: $ python -c import this | grep silently Errors should never pass silently -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19054

[issue19054] Descriptors howto

2013-09-20 Thread Marco Buttu
Changes by Marco Buttu marco.bu...@gmail.com: Removed file: http://bugs.python.org/file31820/py3howto.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19054

[issue19054] Descriptors howto

2013-09-20 Thread Marco Buttu
Changes by Marco Buttu marco.bu...@gmail.com: Removed file: http://bugs.python.org/file31821/py2howto.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19054

[issue19054] Descriptors howto

2013-09-20 Thread Marco Buttu
Changes by Marco Buttu marco.bu...@gmail.com: Added file: http://bugs.python.org/file31829/py2howto.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19054

[issue19054] Descriptors howto

2013-09-20 Thread Marco Buttu
Marco Buttu added the comment: Maybe is better to underline the difference between classes and non-classes objects, instead of between objects and classes, because a class is an object, so it could be confusing). Raymond, what do you think about rewriting this sentence: `The details

[issue19054] Descriptors howto

2013-09-20 Thread Marco Buttu
Changes by Marco Buttu marco.bu...@gmail.com: Removed file: http://bugs.python.org/file31829/py2howto.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19054

[issue19054] Descriptors howto

2013-09-20 Thread Marco Buttu
Changes by Marco Buttu marco.bu...@gmail.com: Added file: http://bugs.python.org/file31830/py2howto.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19054

[issue19054] Descriptors howto

2013-09-20 Thread Marco Buttu
Changes by Marco Buttu marco.bu...@gmail.com: Removed file: http://bugs.python.org/file31828/py3howto.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19054

[issue19054] Descriptors howto

2013-09-20 Thread Marco Buttu
Marco Buttu added the comment: I saw right now your decision about keeping object in the Python 3 doc: http://bugs.python.org/issue17351#msg183870 So, now the py3 patch takes in account just the indentation of the `RevealAccess` example and the class or not suggestion. -- Added file

[issue19054] Descriptors howto

2013-09-19 Thread Marco Buttu
New submission from Marco Buttu: I think in the descriptor howto, at this point: class MyClass(object): x = RevealAccess(10, 'var x') y = 5 or the prompt should not have been, or there is a wrong indentation. Furthermore, in Python 3: http://docs.python.org/3/howto/descriptor.html

[issue19054] Descriptors howto

2013-09-19 Thread Marco Buttu
Changes by Marco Buttu marco.bu...@gmail.com: Added file: http://bugs.python.org/file31821/py2howto.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19054

[issue19054] Descriptors howto

2013-09-19 Thread Marco Buttu
Changes by Marco Buttu marco.bu...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file31820/py3howto.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19054

[issue18839] Wrong sentence in sys.exit.__doc__

2013-08-26 Thread Marco Buttu
New submission from Marco Buttu: Python 3.3:: import sys print(sys.exit.__doc__) exit([status]) Exit the interpreter by raising SystemExit(status). If the status is omitted or None, it defaults to zero (i.e., success). If the status is numeric, it will be used

[issue18570] OverflowError during division: wrong message

2013-07-27 Thread Marco Buttu
New submission from Marco Buttu: When the integer division result is too large to converto to float, and the operands are inside the limits, the result is `inf` or `-inf`:: 2**1023 / 2**-3 inf 2**1022 / 2**-4 inf 2**1023 / 2**-1074 inf When both the result

[issue18570] OverflowError in division: wrong message

2013-07-27 Thread Marco Buttu
Changes by Marco Buttu marco.bu...@gmail.com: -- title: OverflowError during division: wrong message - OverflowError in division: wrong message ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18570

[issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation

2013-07-10 Thread Marco Buttu
New submission from Marco Buttu: The documentaion of sum(): Returns the sum of a sequence of numbers (NOT strings) plus the value of parameter 'start' (which defaults to 0). When the sequence is empty, returns start. A. According to the PEP-8 it should be: Return the sum

[issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation

2013-07-10 Thread Marco Buttu
Marco Buttu added the comment: By reading the Ronald's comment, I realized it is better to keep it simple, so I agree with him. The extremely inefficient reason seems to be less important (Python 3.3): $ python -m timeit -s a=['a']*1; b=['b']*1; a+b 1 loops, best of 3: 0.00831

[issue17704] ImportError: No module named '_curses'

2013-04-12 Thread Marco Buttu
New submission from Marco Buttu: Right now I downloaded and installed Python 3.3.1 on Linux Mint 14, with Cinnamon: $ uname -a Linux buttu-oac 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux $ python3.3 Python 3.3.1 (default, Apr 12 2013, 16:24:16

[issue16916] The Extended Iterable Unpacking (PEP-3132) for byte strings doesn't match the specification

2013-01-10 Thread Marco Buttu
New submission from Marco Buttu: The PEP 3132 said: ... if seq is a slicable sequence, all the following assignments are equivalent if seq has at least three elements: a, b, c = seq[0], seq[1:-1], seq[-1] a, *b, c = seq [a, *b, c] = seq But this doesn't happen for byte strings: seq

[issue16355] inspect.getcomments() does not work in the interactive shell

2012-10-29 Thread Marco Buttu
New submission from Marco Buttu: The documentation for `inspect.getcomments()` says that it returns the lines of comments immediately preceding an object's source code. It works fine for the comments that immediately preceded an object defined in a module: $ more foo.py import inspect

[issue16355] inspect.getcomments() does not work in the interactive shell

2012-10-29 Thread Marco Buttu
Marco Buttu added the comment: If inspect.getcomments() requires a source file to inspect, I think it would be better to indicate it in the doc. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16355

[issue16355] inspect.getcomments() does not work in the interactive shell

2012-10-29 Thread Marco Buttu
Marco Buttu added the comment: I saw there is the same lack of clarity in the doc of `inspect.getsource()`: import inspect print(inspect.getsource.__doc__) Return the text of the source code for an object. The argument may be a module, class, method, function, traceback, frame

[issue16046] python -O does not find *.pyo files

2012-09-25 Thread Marco Buttu
New submission from Marco Buttu: $ echo print(__file__) foo.py $ python3.3 -O -m foo /home/marco/temp/foo.py $ ls foo.py __pycache__ $ rm foo.py $ mv __pycache__/foo.cpython-33.pyo foo.pyo $ rm __pycache__ -r $ ls foo.pyo # The following works in Python3.2, but not in Python 3.3.0rc3

[issue16046] python -O does not find *.pyo files

2012-09-25 Thread Marco Buttu
Changes by Marco Buttu marco.bu...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16046 ___ ___ Python-bugs-list

<    1   2