Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Scopes and Namespaces Example in python

>>> class Complex:
...     def __init__(self, realpart, imagpart):
...         self.r = realpart
...         self.i = imagpart
...
>>> x = Complex(3.0, -4.5)
>>> x.r, x.i
(3.0, -4.5)
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #Scopes #Namespaces #Example #python
ADD COMMENT
Topic
Name
6+3 =