A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/077647.html below:

Class Variable Question

Class Variable Question Class Variable QuestionFredrik Lundh fredrik at pythonware.com
Mon Apr 9 13:05:55 EDT 2001
Romuald Texier wrote:
> Robert Johnson wrote:
>
> > ClassObject.var1=5
>
> > Would this create a variable "var1" inside the class even though the
> > creator of the class never intended it to be there
>
> Not exactly: the new variable is not created inside the class but just in
> the _instance_. The class definition and other instances are left untouched.

depends on what "ClassObject" is, of course -- if it is a class
object (i.e. an object created by a class statement), robert's
exactly right.

Cheers /F



More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4