Changes by Daniel Urban :
--
stage: needs patch -> patch review
___
Python tracker
<http://bugs.python.org/issue13266>
___
___
Python-bugs-list mailing list
Un
New submission from Daniel Urban:
The documentation of the dis module describes the MAKE_CLOSURE opcode
incorrectly. The description of MAKE_FUNCTION was updated in 242d3f8e8c50
(issue14349) to include the qualified name, but MAKE_CLOSURE wan't. A patch is
attched.
--
assignee:
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue16546>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue16545>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
If I understand correctly, the invariant is that len(kw_defaults) ==
len(kwonlyargs). I think the reason is that the following is valid syntax (an
argument without a default after one with a default):
>>> def f(*, a=0, b): pass
...
>>>
And
Daniel Urban added the comment:
Also, it seems, that pickling inner classes will by supported by pickle
protocol version 4 (see PEP 3154). There is already an issue for the
implementation: issue15642.
--
versions: +Python 3.4 -Python 2.7, Python 3.2
Changes by Daniel Urban :
--
resolution: -> duplicate
superseder: -> Integrate pickle protocol version 4 GSoC work by Stefan Mihaila
___
Python tracker
<http://bugs.python.org/i
New submission from Daniel Urban:
The description of the argument of the MAKE_FUNCTION and MAKE_CLOSURE opcodes
in the documentation of the dis module is incorrect. Patch attached.
--
assignee: docs@python
components: Documentation
files: make_function_closure.patch
keywords: needs
Daniel Urban added the comment:
I tried to implement Nick's idea with the separate scope for __class__. It
seems to work, I'm attaching a patch. The patch basically causes the following
class statement:
class C(A, B, metaclass=meta):
def f(self):
return __class__
To b
Daniel Urban added the comment:
Thanks for the review!
Nick, the example with Outer, InnerParent and InnerChild still works (the
evaluation happens before we enter the new scope).
Of course you're all right about __args__ and __kw__. I'll try to find a way to
hide them.
--
Daniel Urban added the comment:
Sorry, I won't have time for that in the following weeks.
--
___
Python tracker
<http://bugs.python.org/issue16554>
___
___
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue16572>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
stage: -> patch review
type: crash -> behavior
___
Python tracker
<http://bugs.python.org/issue16584>
___
___
Python-bugs-list
Changes by Daniel Urban :
--
stage: -> needs patch
type: -> enhancement
versions: +Python 3.4 -Python 2.7, Python 3.1, Python 3.2, Python 3.3
___
Python tracker
<http://bugs.python.org/i
Daniel Urban added the comment:
I don't know what is the protocol for duplicates when the superseder is still
open. If they should be closed, then I think yes, this should be closed.
--
___
Python tracker
<http://bugs.python.org/is
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue16602>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
Could you please point to a specific example which is incorrect? Thank you.
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue16
Daniel Urban added the comment:
Both work fine.
--
___
Python tracker
<http://bugs.python.org/issue16607>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue16612>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue16619>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
type: crash -> behavior
___
Python tracker
<http://bugs.python.org/issue11159>
___
___
Python-bugs-list mailing list
Unsubscri
Changes by Daniel Urban :
--
stage: test needed -> patch review
___
Python tracker
<http://bugs.python.org/issue12915>
___
___
Python-bugs-list mailing list
Un
Daniel Urban added the comment:
As John Hampton have explained it, the documentation is actually correct.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issu
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue16832>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
stage: -> patch review
___
Python tracker
<http://bugs.python.org/issue16839>
___
___
Python-bugs-list mailing list
Unsubscri
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue16894>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Daniel Urban:
The attached patch implements PEP 422 -- Simple class initialisation hook
(__init_class__). It includes tests, but it doesn't include documentation yet.
--
components: Interpreter Core, Library (Lib)
files: pep422_1.patch
keywords: needs review,
Daniel Urban added the comment:
Thanks for the review Ezio!
I've fixed the order of the arguments of assertEqual. Regarding your other
comment: I agree that your code is shorter and clearer, but it doesn't do
exactly the same thing. cls.__init_class__ can be None, and in that case,
Daniel Urban added the comment:
I'm attaching a new patch with some documentation and one additional test.
--
Added file: http://bugs.python.org/file28912/pep422_3.patch
___
Python tracker
<http://bugs.python.org/is
Daniel Urban added the comment:
I like the 3rd alternative the most. It seems to me, that __abstractmethods__
is currently an undocumented implementation detail of ABCs. The 1st alternative
would cause every type to have an empty __abstractmethods__ (which is
technically correct, but probably
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue19072>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Daniel Urban :
I'm trying to write an iterable class, and it behaves strangely with
itertools.zip_longest. The following example demonstrates this:
class Repeater: # this class is similar to itertools.repeat
def __init__(self, o, t):
self.o = o
self.t
Daniel Urban added the comment:
> I saw strange thing with following code + release26-maint/trunk.
I tried your code (with the new-style class) with Python 2.6.4 and 2.7a0
(trunk), and both worked fine. I built them with GCC 4.2.4 on Ubuntu 8
Daniel Urban added the comment:
In this new patch, __eq__ compares also the __dict__ of the two partial
instances.
--
Added file: http://bugs.python.org/file17363/partial_eq_hash_4.diff
___
Python tracker
<http://bugs.python.org/issue8
Daniel Urban added the comment:
Isn't it possible, that in the issue5094b.diff patch, in the new_timezone_ex
function, in this part:
self = (PyDateTime_TimeZone *)type->tp_alloc(type, 0);
if (self == NULL)
return NULL;
should be a Py_DECREF(offset) call?
I mean lik
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue8916>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue7989>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
In Doc/library/datetime.rst, in the documentation of datetime.utcnow this part:
".. versionchanged:: 2.7" probably should be ".. versionchanged:: 3.2".
--
___
Python tracker
<http://bu
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue8998>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
> * When I have thought about Python crypto in the stdlib, I've considered
> modeling it after hashlib, so you would get cipher = cryptolib.AES(bits=192,
> ...) etc. (Caveat: haven't thought it through.)
I think there is a relevant PEP:
Daniel Urban added the comment:
> disassemble_string should've been private as well, while we are editing this
> module.
Attached the updated patch.
--
Added file: http://bugs.python.org/file17839/issue6507_3.diff
___
Python tra
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue9147>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Daniel Urban :
The documentation of PyType_Type
(http://docs.python.org/dev/py3k/c-api/type.html#PyType_Type) is this:
"This is the type object for type objects; it is the same object as type and
types.TypeType in the Python layer."
But in py3k there is no type
Daniel Urban added the comment:
The attached patch adds the range.count and range.index methods.
Pseudocode for the two method:
def count(self, ob):
if ob in self:
return 1
else:
return 0
def index(self, ob, start=0, stop=len(self)):
if ob in self:
idx
Daniel Urban added the comment:
Sorry, the previous patch has a reference leak. I'm attaching the fixed patch
as issue9213a.diff (I also added a few tests with really big ranges).
--
Added file: http://bugs.python.org/file18128/issue9213a
Daniel Urban added the comment:
According to PEP 7 [1], all declarations must be at the top of a block. So you
probably should move the "char *mod_name_str" and "PyModuleObject *module"
declarations to the beginning of the function's body.
[1] http://www.pyt
Daniel Urban added the comment:
The attached patch adds the isdisjoint method to dict_keys and dict_items.
Pseudocode for the method:
def isdisjoint(self, other):
if self is other:
if len(self) == 0:
return True
else:
return False
else
Daniel Urban added the comment:
I tried, and wasn't able to reproduce with py3k (r83091), 3.1.2,
release27-maint (r83111), release26-maint (r83111).
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/i
Daniel Urban added the comment:
> Unless there is a reason I have missed, I would iterate through the
> smaller set, which might even be empty or nearly so, rather than
> either in particular.
You're right, here is a new patch. Pseudocode:
def isdisjoint(self, other):
if
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue8733>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
The patch applies cleanly to the py3k branch (r83238). The unittests pass.
The code looks good to me (it does exactly what was described as the solution).
There are some trailing whitespace on some lines, that will need to be deleted.
--
nosy: +durban
Daniel Urban added the comment:
> P.S. Please let me know how to detect such issues in future patches.
In some editors there is an option "Remove trailing spaces" or something like
that. Also, some editors (for example Kate) show tr
Changes by Daniel Urban :
--
nosy: +durban
type: compile error -> behavior
___
Python tracker
<http://bugs.python.org/issue9533>
___
___
Python-bugs-list mai
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue9520>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue9417>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
I think the situation is a bit more complicated. Here is the example described
by Pedro Werneck (this is py3k, but its essentially the same in 2.x):
>>> class M_A(type):
... def __new__(mcls, name, bases, ns):
... print(
Daniel Urban added the comment:
I don't think this is a bug:
>>> from datetime import datetime
>>> class tdatetime(datetime, foo='bar'):
... pass
...
Traceback (most recent call last):
File "", line 1, in
TypeError: type() takes 1 or 3 ar
Daniel Urban added the comment:
Thanks for the grammar correction, I've fixed it in the new patch.
The new patch also adds object.__init_class__ (which is a no-op), to support
cooperative multiple inheritance of __init_class__. (Adding type.__init_class__
was mentioned in the pytho
Changes by Daniel Urban :
Removed file: http://bugs.python.org/file29097/pep422_4.patch
___
Python tracker
<http://bugs.python.org/issue17044>
___
___
Python-bugs-list m
Changes by Daniel Urban :
Added file: http://bugs.python.org/file29098/pep422_4.patch
___
Python tracker
<http://bugs.python.org/issue17044>
___
___
Python-bugs-list m
Daniel Urban added the comment:
Yes, if we would add a regular (instance) method __init_class__ to type, it
could (probably) work for regular (non-meta) classes, but not for metaclasses.
If a metaclass Meta wouldn't define __init_class__ itself, calling
Meta.__init_class__
Changes by Daniel Urban :
Added file: http://bugs.python.org/file29102/pep422.patch
___
Python tracker
<http://bugs.python.org/issue17044>
___
___
Python-bugs-list mailin
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue17279>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
I did, and I've been told that it has been added to the bug tracker:
http://mail.python.org/pipermail/python-committers/2012-May/001987.html
--
___
Python tracker
<http://bugs.python.org/is
Daniel Urban added the comment:
I've looked into implementing the changes in the new version of the PEP. It
seems, that currently type.__new__ copies the dict returned by __prepare__
(http://hg.python.org/cpython/file/55806d234653/Objects/typeobject.c#l2058). I
think this means that so
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue17422>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue17421>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
I've attached a new patch. With this patch, type.__prepare__ has an optional
keyword-only argument 'namespace', and returns it if it's specified. Also,
__init_class__ is passed an argument: a mapping proxy of the mapping originally
ret
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue17853>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue16429>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue17950>
___
___
Python-bugs-list mailing list
Unsubscribe:
201 - 271 of 271 matches
Mail list logo