Changes by Giacomo Alzetta :
--
assignee: -> docs@python
components: +Documentation
nosy: +docs@python
type: -> enhancement
versions: +Python 2.7
___
Python tracker
<http://bugs.python.org/i
New submission from Giacomo Alzetta:
Python2.7 documentation is missing critical information regarding the
backporting of the new-buffer protocol.
There is no mention whatsoever of the Py_TPFLAGS_HAVE_NEWBUFFER flag which is
required to implement it. The only way to discover it is by reading
Giacomo Alzetta added the comment:
"their hash value is their id()" seems quite clearly stating that:
>>> class A: pass
...
>>> a = A()
>>> hash(a) == id(a)
should be true, but:
>>> hash(a) == id(a)
False
(both in python2 and in python3)
The p
New submission from Giacomo Alzetta:
The documentation for hashable in the glossary
(https://docs.python.org/3.4/reference/datamodel.html#object.__hash__) is
incorrect:
they all compare unequal (except with themselves), **and their hash value is
their id().**
It is *not* true that their
Giacomo Alzetta added the comment:
I asked this because, for example, in Haskell it *is* a well-defined behaviour
(see its documentation at:
http://hackage.haskell.org/package/containers-0.5.4.0/docs/Data-Set.html): the
left operand is preferred by all operations.
In fact, working with
New submission from Giacomo Alzetta:
Currently the documentation for set (at:
http://docs.python.org/2/library/stdtypes.html#set) does not mention which
operand is preferred when performing the usual binary operations.
For example the following sample code doesn't have a defined r
Giacomo Alzetta added the comment:
Note that the documentation for formatting with %, found here:
http://docs.python.org/2/library/stdtypes.html#string-formatting-operations,
states:
"""
If format requires a single argument, values may be a single non-tuple object.
[5] Ot
Giacomo Alzetta added the comment:
The documentation for python 3.3.1 states, at
http://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files,
states:
f.tell() returns an integer giving the file object’s current position in
the file, **measured in bytes from the beginning
Giacomo Alzetta added the comment:
I can reproduce a similar behaviour, but instead of negative values I obtain
huge values(which may as well be a "negative" unsigned converted to a python
int).
See this stackoverflow question:
http://stackoverflow.com/questions/15934950/python
Giacomo Alzetta added the comment:
I can't find any mention of this behaviour in python3's documentation, nor any
reference to ftell(). Is it only well hidden or was it deleted by accident?
--
nosy: +bakuriu
status: pending -> open
_
10 matches
Mail list logo