Re: Access from one class to methode of other class
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: Access from one class to methode of other class

From: Aaron Bingham <bingham@cenix-bioscience.com>
Date: Fri May 27 2005 - 08:41:14 CEST

Dennis Lee Bieber <wlfraed@ix.netcom.com> writes:

> On Thu, 26 May 2005 14:33:45 +0200, VK <"myname"@example.invalid>
> declaimed the following in comp.lang.python:
>
>> Hi, all!
>>
>> In my programm i have to insert a variable from class 2 to class 1 and I
>> get error NameError: global name 'd' is not defined. How do I get access
>> to d.entry.insert() method of class 1
>>
>> class 1:
> <shudder> Does Python even allow numeric class names?

Fortunately, no:

>>> class 1:
  File "<stdin>", line 1
    class 1:
          ^
SyntaxError: invalid syntax

-- 
--------------------------------------------------------------------
Aaron Bingham
Software Engineer
Cenix BioScience GmbH
--------------------------------------------------------------------
Received on Thu Sep 29 16:14:46 2005