New submission from Giacomo :
Here I propose a new function, namely .ratio_min(self,m).
.ratio_min(self,m) is an extension of the difflib's function .ratio(self).
Equivalently to .ratio(self), .ratio_min(self,m) returns a measure of two
sequences' similarity (float in [0,1]). In a
Giacomo Caironi added the comment:
Ok but then why does it work in python3.8 and not in python 3.9?
--
___
Python tracker
<https://bugs.python.org/issue42
Giacomo Caironi added the comment:
Why do you say that `getaddrinfo()` is called at the interpreter shutdown
state? On my machine it works and the output is [(,
, 6, '', ('216.58.208.132', 8333)),
(, , 17, '',
('216.58.208.132', 8333)), (, , 0
New submission from Giacomo Caironi :
import asyncio
import traceback
from threading import Thread
class Test(Thread):
def __init__(self):
super().__init__()
self.loop = asyncio.new_event_loop()
async def getaddrinfo(self, loop):
try:
print(await
Giacomo Mazzamuto added the comment:
Hello,
the segmentation fault is also resolved by finalizing the initialization of
InternalType by calling PyType_Ready(&InternalType), just like you do with
ExternalType
--
nosy: +Giacomo Mazza
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
_
15 matches
Mail list logo