[issue14972] listcomp with nested classes

2012-05-31 Thread josmiley

New submission from josmiley :

# this runs with python2.7, not with python3.2
class Foo(object):

class Bar(object):
pass

Attr = [Bar()for n in range(10)]

# solved in this way ...
class Foo(object):

class Bar(object):
pass

Attr = []
for n in range(10): Attr.append(Bar())

--
messages: 162022
nosy: josmiley
priority: normal
severity: normal
status: open
title: listcomp with nested classes
type: behavior
versions: Python 3.2

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



[issue14965] super() and property inheritance behavior

2012-05-31 Thread josmiley

josmiley  added the comment:

>>> class DerivedProp(BaseProp):
... @property
... def p(self):
... return super(DerivedProp, self).p * 2
... @p.setter
... def p(self, value):
... BaseProp.p.__set__(self,value / 2)

--
nosy: +josmiley

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