Class Not Auto-Init On Import

Steve Holden steve at
Sun Apr 22 21:06:07 EDT 2007

Dennis Lee Bieber wrote:
> On Sat, 21 Apr 2007 11:56:05 -0400, Steve Holden <steve at>
> declaimed the following in comp.lang.python:
>> Robert Rawlins - Think Blue wrote:
>>> LocationService.setIP(‘’)
>> This isn't a call on a specific LocationService instance, it's a call on 
>> the SetIP method of the class (presumably you have to set the IP address 
>> of the server or whatever - typically class methods are used to invoke 
>> functions or set up conditions that must apply to all instances of the 
>> class. If you wanted to set the IP for a particular instance you would 
>> normally call a method instance, as in
> 	Actually, in the absence of a "from ... import *", that isn't even a
> call on the /class/.
> 	It's a call on a standalone setIP() located in the imported /module/

Indeed it is. Good catch.

Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd
Skype: holdenweb
Recent Ramblings

More information about the Python-list mailing list