[Python-Dev] Possible bug in class-init, lookin for mentors

2017-04-21 Thread Justus Schwabedal
Hi everyone,

I possibly found a bug in class __init__ and would like to fix it.  So I'm
looking for a mentor to help me.

`class Foo:
def __init__(self, bar=[]):
self.list = bar

spam_1 = Foo()
spam_2 = Foo()

spam_1.list.append(42)
print(spam_2.list)`

At least I think it's a bug.  Maybe it's a feature..

Best Regards, Jus





-- 
Justus Schwabedal

Handy (D): +49 177 939 5281
email: jschwabe...@googlemail.com
skype: justus1802

Görlitzer Str. 22
01099 Dresden, Sachsen
Germany

Steinkreuzstr. 23
53757 Sankt Augustin, NRW
Germany
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Possible bug in class-init, lookin for mentors

2017-04-21 Thread Justus Schwabedal
Hi everyone,

I possibly found a bug in class initialization and would like to fix it.
Because it's my first journey to core-dev, I would really appreciate the
help of a mentor that I may ask a few questions to get me up to speed.

To my person, I have previously worked on larger projects in python, c, and
c++ if that information helps, and I'm really curious to learn more about
the interiors of the greatest interpreter known to wo-/men.

Here comes the bug-producing example:

`class Foo:
def __init__(self, bar=[]):
self.list = bar

spam_1 = Foo()
spam_2 = Foo()

spam_1.list.append(42)
print(spam_2.list)`

At least I think it's a bug.  Maybe it's a feature..

Best Regards, Jus

---

f*** me  on github :)
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com