| | |
a class containg a set of data members
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Oct 2007
Posts: 30
Reputation:
Solved Threads: 0
Hi, my friends,
I am new to python. I have a question to ask you a empty class with a set of data memebers. The data members could be array. what is wrong with the following code?
Thanks in avvance.
# define an empty calss
class temp:
pass
# copy1 is a copy of class with only data members (could be 1-dimension array
copy1 = temp
tem2 = ones(100)
copy1.x(
= tem2(
when I run this code to debug, it says invalid syntax in the last line of code. I could not figure out why. Help please. Is there any place to find good source about CLASS usage in python.
John
I am new to python. I have a question to ask you a empty class with a set of data memebers. The data members could be array. what is wrong with the following code?
Thanks in avvance.
# define an empty calss
class temp:
pass
# copy1 is a copy of class with only data members (could be 1-dimension array
copy1 = temp
tem2 = ones(100)
copy1.x(
= tem2(
when I run this code to debug, it says invalid syntax in the last line of code. I could not figure out why. Help please. Is there any place to find good source about CLASS usage in python.
John
![]() |
Similar Threads
- only const static integral data members can be initialized inside a class or struct (C++)
- Deitel's "C++ How To Program" exercise 2.18 (C++)
- Confused writing a Java Class (Java)
- Deitel's "C++ How To Program" exercise 2.18 (C++)
- Dynamic memory allocation homework (C++)
- accessing private data members (C++)
Other Threads in the Python Forum
- Previous Thread: error in guessing game
- Next Thread: returning true and false...
Views: 1157 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for Python
accessdenied address ansi backend beginner changecolor class code conversion coordinates copy curves customdialog dan08 dictionary directory dynamic edit examples excel feet file float font format ftp function generator getvalue gui halp homework i/o images import info input ip java line linux list lists loop mouse mysql newb number numbers output panel parsing path port prime print program programming projects py2exe pygame pyqt python queue random rational recursion recursive schedule screensaverloopinactive scrolledtext searchingfile server ssh stamp statictext string strings sudokusolver table terminal text thread threading time tkinter tlapse tuple tutorial type ubuntu unicode url urllib urllib2 variable whileloop windows write wxpython





