A trivial question
Tayfun Kayhan
tayfun92_kayhan at yahoo.com
Wed Sep 28 17:49:21 EDT 2011
More information about the Python-list mailing list
Wed Sep 28 17:49:21 EDT 2011
- Previous message (by thread): syntactic sugar for def?
- Next message (by thread): A Trivial Question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I accidentally wrote such a code (below) while trying to write sth else for my application but i am now just wondering much how to run the class Foo, if it is possible. Is not it weird that Python does not give any error when I run it ? Sorry for that it's pretty unimportant question according to the other questions being asked here :D
def trial():
class Foo(object):
def __init__(self):
print("Hello, world!")
trial() # not worked, as expected.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110928/03705011/attachment.html>
- Previous message (by thread): syntactic sugar for def?
- Next message (by thread): A Trivial Question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list