Changes by Eugene Kapun :
Added file: http://bugs.python.org/file19618/test-functools.py
___
Python tracker
<http://bugs.python.org/issue6083>
___
___
Python-bugs-list m
Changes by Eugene Kapun :
Added file: http://bugs.python.org/file19617/test-ctypes.py
___
Python tracker
<http://bugs.python.org/issue6083>
___
___
Python-bugs-list mailin
Eugene Kapun added the comment:
Actually, this can't be fixed without modifying C API methods PyArg_ParseTuple
and PyArg_ParseTupleAndKeywords, because it's possible to make an object
deallocated before PyArg_ParseTuple returns, so Py_INCREF immediately after
parsing would be a
Changes by Eugene Kapun :
Added file: http://bugs.python.org/file16981/repr.diff
___
Python tracker
<http://bugs.python.org/issue8420>
___
___
Python-bugs-list mailin
Eugene Kapun added the comment:
This code crashes python by using another bug in set_repr. This only affects
py3k. This code relies on out-of-memory condition, so run it like:
$ (ulimit -v 65536 && python3 test.py)
Otherwise, it will eat all your free memory before crashing.
val = &qu
Eugene Kapun added the comment:
> > One solution is to check that so->mask didn't
> > change as well.
>
> I saw that and agree it would make a tighter check, but haven't convinced
> myself that it is necessary.
Without this check, it is possible that th
Eugene Kapun added the comment:
This patch still assumes that if so->table didn't change then the table wasn't
reallocated (see http://en.wikipedia.org/wiki/ABA_problem). One solution is to
check that so->mask didn't change as well. Also, checking that refcnt > 1
New submission from Eugene Kapun :
>>> list().__init__(a=0)
Traceback (most recent call last):
File "", line 1, in
TypeError: 'a' is an invalid keyword argument for this function
>>> set().__init__(a=0)
--
components: Interpreter Core
messages:
Changes by Eugene Kapun :
--
type: -> crash
___
Python tracker
<http://bugs.python.org/issue8420>
___
___
Python-bugs-list mailing list
Unsubscri
New submission from Eugene Kapun :
This code shows that frozensets aren't really immutable. The same frozenset is
printed twice, with different content. Buggy functions are set_contains,
set_remove and set_discard, all in Objects/setobject.c
class bad:
def __eq__(self,
Eugene Kapun added the comment:
I've found more unsafe code in Objects/setobject.c.
This code makes Python 3.1.2 segfault by using a bug in function set_merge:
class bad:
def __eq__(self, other):
if be_bad:
set2.
Eugene Kapun added the comment:
-1 on special-casing string without an encoding. Current code does (almost)
this:
...
if argument_is_a_string:
if not encoding_is_given: # Special case
raise TypeError("string argument without an encoding")
encod
New submission from Eugene Kapun :
>>> small_set = set(range(2000))
>>> large_set = set(range(2000))
>>> large_set -= small_set # Fast
>>> small_set -= large_set # Slow, should be fast
>>> small_set = small_set - large_set # Fast
--
compo
New submission from Eugene Kapun :
I've noticed that set_lookkey (in Objects/setobject.c) does some unsafe things:
Objects/setobject.c:
> if (entry->hash == hash) {
> startkey = entry->key;
> Py_INCREF(startkey);
> cmp = PyObject_RichCompareBo
Eugene Kapun added the comment:
__doc__ of bytearray says:
> bytearray(iterable_of_ints) -> bytearray
> bytearray(string, encoding[, errors]) -> bytearray
> bytearray(bytes_or_bytearray) -> mutable copy of bytes_or_bytearray
> bytearray(memory_view) -> bytearray
So, unl
Eugene Kapun added the comment:
> Not really, chars are not ints
Yes, however, empty string contains exactly zero chars.
> and anyway the empty string fall in the first case.
Strings aren't mentioned in documentation of bytearray slice assignment.
However, I think that bytearray
Changes by Eugene Kapun :
--
nosy: +abacabadabacaba
___
Python tracker
<http://bugs.python.org/issue1766304>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Eugene Kapun :
>>> bytes(10)
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
>>> bytes(10 ** 100)
Traceback (most recent call last):
File "", line 1, in
TypeError: 'int' object is not iterable
--
components: Interpr
Eugene Kapun added the comment:
Empty string is an iterable of integers in the range 0 <= x < 256, so it should
be allowed.
>>> all(isinstance(x, int) and 0 <= x < 256 for x in "")
True
>>> bytearray()[:] = ""
Traceback (most recent ca
New submission from Eugene Kapun :
>>> a = bytearray()
>>> a[:] = 0 # Is it a feature?
>>> a
bytearray(b'')
>>> a[:] = 10 # If so, why not document it?
>>> a
bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
>>> a[:]
20 matches
Mail list logo