Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- class Person(object):
- """Legt eine Person an"""
- def eingabe(self, vorname, name, alter):
- """Legt eine Person an"""
- self.vorname = vorname
- self.name = name
- self.alter = alter
- print '(Person wurde erfolgreich initialisiert)'
- print '%s, %s, ("%s")' % (self.vorname, self.name, self.alter),
- p = Person('Sascha', 'Siegel', 24)
- personen = [p]
- /pythonuebung1.py
- Traceback (most recent call last):
- File "./pythonuebung1.py", line 14, in <module>
- p = Person('Sascha', 'Siegel', 24)
- TypeError: default __new__ takes no parameters
Add Comment
Please, Sign In to add comment