Hi,
The following code worked on Python 3.2, but no longer works in 3.4. Did
something change, or have I always been doing something dumb?
(I realise the code is pointless as is - it's the simplest example I can give
of a problem I am seeing with more complex code).
class Foo:
... def
But then nothing will be passed to __init__ on the subclass.
Andrew
class Foo:
... def __new__(cls, *args, **kargs):
... print('new', args, kargs)
... super().__new__(cls)
...
class Bar(Foo):
... def __init__(self, a):
... print('init', a)
...
Bar(1)
new
On Wednesday, 13 May 2015 11:36:12 UTC-3, Thomas Rachel wrote:
Am 13.05.2015 um 15:25 schrieb andrew cooke:
class Foo:
... def __new__(cls, *args, **kargs):
... print('new', args, kargs)
... super().__new__(cls, *args, **kargs)
new (1,) {}
Traceback (most
On Wed, May 13, 2015 at 8:42 AM, andrew cooke and...@acooke.org wrote:
On Wednesday, 13 May 2015 11:36:12 UTC-3, Thomas Rachel wrote:
Am 13.05.2015 um 15:25 schrieb andrew cooke:
class Foo:
... def __new__(cls, *args, **kargs):
... print('new', args, kargs)
...
andrew cooke wrote:
But then nothing will be passed to __init__ on the subclass.
Andrew
class Foo:
... def __new__(cls, *args, **kargs):
... print('new', args, kargs)
... super().__new__(cls)
...
class Bar(Foo):
... def __init__(self, a):
...
Am 13.05.2015 um 15:25 schrieb andrew cooke:
class Foo:
... def __new__(cls, *args, **kargs):
... print('new', args, kargs)
... super().__new__(cls, *args, **kargs)
new (1,) {}
Traceback (most recent call last):
File stdin, line 1, in module
File stdin, line 4, in
On Wed, May 13, 2015 at 8:45 AM, andrew cooke and...@acooke.org wrote:
class Foo:
... def __new__(cls, *args, **kargs):
... print('new', args, kargs)
... super().__new__(cls)
...
class Bar(Foo):
... def __init__(self, a):
... print('init', a)
...
Bar(1)
On Wednesday, 13 May 2015 13:37:23 UTC-3, Terry Reedy wrote:
On 5/13/2015 9:25 AM, andrew cooke wrote:
The following code worked on Python 3.2, but no longer works in 3.4.
Bugfixes break code that depends on buggy behavior. See
https://bugs.python.org/issue1683368
Your code also fails
On Wednesday, May 13, 2015 at 3:46:16 PM UTC-4, Mark Lawrence wrote:
On 13/05/2015 19:42, andrew cooke wrote:
On Wednesday, 13 May 2015 13:37:23 UTC-3, Terry Reedy wrote:
On 5/13/2015 9:25 AM, andrew cooke wrote:
The following code worked on Python 3.2, but no longer works in 3.4.
On 5/13/2015 2:42 PM, andrew cooke wrote:
On Wednesday, 13 May 2015 13:37:23 UTC-3, Terry Reedy wrote:
On 5/13/2015 9:25 AM, andrew cooke wrote:
The following code worked on Python 3.2, but no longer works in 3.4.
Bugfixes break code that depends on buggy behavior. See
On 13/05/2015 19:42, andrew cooke wrote:
On Wednesday, 13 May 2015 13:37:23 UTC-3, Terry Reedy wrote:
On 5/13/2015 9:25 AM, andrew cooke wrote:
The following code worked on Python 3.2, but no longer works in 3.4.
Bugfixes break code that depends on buggy behavior. See
On Wednesday, 13 May 2015 11:56:21 UTC-3, Ian wrote:
On Wed, May 13, 2015 at 8:45 AM, andrew cooke and...@acooke.org wrote:
class Foo:
... def __new__(cls, *args, **kargs):
... print('new', args, kargs)
... super().__new__(cls)
...
class Bar(Foo):
... def
On Thu, 14 May 2015 06:33 am, Ned Batchelder wrote:
On Wednesday, May 13, 2015 at 3:46:16 PM UTC-4, Mark Lawrence wrote:
On 13/05/2015 19:42, andrew cooke wrote:
On Wednesday, 13 May 2015 13:37:23 UTC-3, Terry Reedy wrote:
On 5/13/2015 9:25 AM, andrew cooke wrote:
[...]
Did something
On 13/05/2015 14:25, andrew cooke wrote:
Hi,
The following code worked on Python 3.2, but no longer works in 3.4. Did
something change, or have I always been doing something dumb?
(I realise the code is pointless as is - it's the simplest example I can give
of a problem I am seeing with
On 5/13/2015 12:36 PM, Terry Reedy wrote:
On 5/13/2015 9:25 AM, andrew cooke wrote:
The following code worked on Python 3.2, but no longer works in 3.4.
Bugfixes break code that depends on buggy behavior. See
https://bugs.python.org/issue1683368
Your code also fails in 2.7.9 if you inherit
On 5/13/2015 12:38 PM, Mark Lawrence wrote:
I'm completely convinced that I've seen a change go through on the bug
tracker that impacts on this area, but many months if not years ago.
Unfortunately searching the bug tracker for super, __new__, __init__ and
so on gets a lot of hits, leaving my
On 5/13/2015 9:25 AM, andrew cooke wrote:
The following code worked on Python 3.2, but no longer works in 3.4.
Bugfixes break code that depends on buggy behavior. See
https://bugs.python.org/issue1683368
Your code also fails in 2.7.9 if you inherit Foo from object.
The exact error messages
On 13/05/2015 18:05, Terry Reedy wrote:
On 5/13/2015 12:38 PM, Mark Lawrence wrote:
I'm completely convinced that I've seen a change go through on the bug
tracker that impacts on this area, but many months if not years ago.
Unfortunately searching the bug tracker for super, __new__, __init__
18 matches
Mail list logo