A proc to vlastne chces preimplementovavat? 2010/11/3 Visgean Skeloru <visg...@gmail.com>: > Aha tak díky za odpovědi, čekal jsem že to nějak půjde ale konec konců jak > říkáte, je to zbytečné... > > btw: i když přepíšu builtin metody tak to nefunguje: > >> class pff(): >> asx = "mlam mlam" >> >> __builtins__.__str__ = pff >> __builtins__.str = pff >> str = pff >> >> "".asx > > AttributeError: 'str' object has no attribute 'asx' > > 2010/11/3 Vojtěch Rylko <vojta.ry...@seznam.cz> >> >> Viz stejný problém (místo 'str' problém s 'list') >> >> http://stackoverflow.com/questions/3795591/can-i-override-python-list-displays >> >> You cannot trivially override the syntactic sugar used for built-in types, >> since this happens at the compiler level. > > _______________________________________________ > Python mailing list > Python@py.cz > http://www.py.cz/mailman/listinfo/python >
-- Rules of Optimization: Rule 1: Don't do it. Rule 2 (for experts only): Don't do it yet. _______________________________________________ Python mailing list Python@py.cz http://www.py.cz/mailman/listinfo/python