Klassen in Python3 von object ableiten oder nicht?
Hallo zusammen. In Python2 wird ja zwischen oldstyle classes class A: pass und newstyle classes class A(object): pass unterschieden. In Python3 gibt es nur noch newstyle classes. Trotzdem kann man eine Klasse immer noch explizit von object ableiten und 2to3 elimiert das auch nicht automatisch. Gibt es in Python3 einen Unterschied zwischen beiden Varianten oder kann man '(object):' gefahrlos immer durch ':' ersetzen? Bernd -- no time toulouse
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bernd Nawothnig wrote:
oder kann man '(object):' gefahrlos immer durch ':' ersetzen?
Ja - -aj -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQGUBAEBAgAGBQJQxObFAAoJEADcfz7u4AZjQ6ELv39f8Kh3oAKq3zNQZWng8zmr 07h3UKpORND7FUJIzdhsVW3MOtW1H3if5lFqO2Y7xH5czybXW1BAXmKfk0HdnNEH ml5nWY8DTMTfD9FXx2HimqEmBDNmzFcuVdnnZV7bNS7U73EfusSPIH4WX0AV1JsB R8hCotkB5K70SggAG4GshghI/u8p4EArzGmhQBpHDZZKRzAHFTsPiWtYZLbrcUFo gxrvjH/Od2uM8JfOc4Eu2+ZAOCcnMURPiqu5fvA3GMedJAA4OyUXN9GM3Y4tl9/b z5APrUpgkBKsgz7jTOT5pRpE6fJo/GDTYVm33Dbhv8JeLJWD/7+LkU7zxB2aOrPb a7lp/AuEoAqkqeHH1d1uxMQq1OcPCz5HBDBQ8IUUXsf8j+Q3U2LESfXdkPYbCoRf 6Ambautyyeu86gI54BpMKO/l5NgoVb+uDbLmQGCTArLui+r3qks+SdUMUdt14wB7 eHhfkvppW3y73zrPEClLjezD7JElQlc= =Od1V -----END PGP SIGNATURE-----
participants (2)
-
Andreas Jung
-
Bernd Nawothnig