Classes and the command line

Seymore4Head Seymore4Head at Hotmail.invalid
Sun Oct 26 22:27:18 EDT 2014


I am trying to learn classes.
I am currently using Python 2.7 at the command line.
If you try to type commands at the command line and make the slightest
mistake you have to start over.
I was trying to copy and paste these instructions into the command
prompt. 

http://en.wikibooks.org/wiki/Python_Programming/Classes
>>> class Foo:
...     def setx(self, x):
...         self.x = x
...     def bar(self):
...         print self.x

There is really no way to do that without pasting line by line is
there and adding deleting spaces?  And if you use spaces and tabs,
they are not the same.

http://imgur.com/a/XTkAm



More information about the Python-list mailing list