Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > it.comp.lang.python > #7674

Classi

Newsgroups it.comp.lang.python
From Smith <smith@smith.com>
Subject Classi
Message-ID <47Kgz.47242$pt.15731@tornado.fastwebnet.it> (permalink)
Date 2016-07-11 12:00 +0200

Show all headers | View raw


Ciao a tutti,
perchè questo script mi restituisce il messaggio d'errore:

AttributeError: 'NoneType' object has no attribute 'moo'

Mentre dovrei ottenere :

'python3.4'

Mi potete aiutare?
Grazie


def foo():
     a = 'python3.4'

     class Foo:
         def moo():
             print(a)
             return Foo
F = foo()
F.moo()

Back to it.comp.lang.python | Previous | NextNext in thread | Find similar


Thread

Classi Smith <smith@smith.com> - 2016-07-11 12:00 +0200
  Re: Classi Riccardo Lemmi <riccardo@reflab.com> - 2016-07-13 11:52 +0200
    Re: Classi Smith <smith@smith.it> - 2016-07-15 21:07 +0200

csiph-web