• [^] # Re: Et pis .....thon n'est pas très TDAH-compliant, si ?

    Posté par . En réponse au journal Lamentations ou les remords d'un geek. Évalué à 5.

    Exact, C'est quand même idiot que ces imbéciles de programmeurs python n'y aient pas pensé.
    Python 3.1.2 (r312:79147, May 8 2010, 16:36:46) 
    [GCC 4.4.4] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> class Degage:
    ... def __init__(self):
    ... self.__pastouche="lal"
    ... def hello(self):
    ... return self.__pastouche
    ... 
    >>> a=Degage()
    >>> a.__pastouche
    Traceback (most recent call last):
     File "", line 1, in 
    AttributeError: 'Degage' object has no attribute '__pastouche'
    >>> a.hello()
    'lal'