[issue29944] Argumentless super() calls do not work in classes constructed with type()

2017-03-29 Thread assume_away

New submission from assume_away:

The simplest example:

def mydec(cls):
return type(cls.__name__, cls.__bases__, dict(cls.__dict__))

@mydec
class MyList(list):

def extend(self, item):
super(MyList, self).extend(item)

def insert(self, index, object):
super().insert(index, object)

>>> lst = MyList()
>>> lst.extend([2,3])
>>> lst.insert(0, 1)
TypeError: super(type, obj): obj must be an instance or subtype of type
>>> lst
[2, 3]

If this is intended behavior, at least the error message could be fixed.

--
messages: 290823
nosy: assume_away
priority: normal
severity: normal
status: open
title: Argumentless super() calls do not work in classes constructed with type()
type: behavior
versions: Python 3.6

___
Python tracker 
<http://bugs.python.org/issue29944>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29855] The traceback compounding of RecursionError fails to work with __get__

2017-03-19 Thread assume_away

New submission from assume_away:

class Property:
def __init__(self, getter):
self.getter = getter

def __get__(self, instance, cls):
return self.getter(cls if instance is None else instance)

class MyClass:
@Property
def something(cls):
return cls.something

Calling MyClass.something will show all 990+ RecursionError message.

--
messages: 289867
nosy: assume_away
priority: normal
severity: normal
status: open
title: The traceback compounding of RecursionError fails to work with __get__
type: behavior
versions: Python 3.6

___
Python tracker 
<http://bugs.python.org/issue29855>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29653] IDLE - call tips show wrapper's argpsec instead of wrapped

2017-02-25 Thread assume_away

New submission from assume_away:

Many wrappers use the famous (*args, **kwargs) argspec, which is less than 
helpful for a function that uses some positional arguments and maybe a few 
keyword only arguments, ie (x, y, z=10). Other IDEs have the capability of 
showing the wrapped functions argspec in a calltip, so why shouldn't IDLE?

--
assignee: terry.reedy
components: IDLE
files: calltips.py
messages: 288580
nosy: assume_away, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE - call tips show wrapper's argpsec instead of wrapped
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file46669/calltips.py

___
Python tracker 
<http://bugs.python.org/issue29653>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com