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
Changes by Marco Buttu marco.bu...@gmail.com:
--
type: - enhancement
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19068
___
___
Python-bugs-list
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Changes by Marco Buttu marco.bu...@gmail.com:
--
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16046
___
___
Python-bugs-list
101 - 135 of 135 matches
Mail list logo