Help - For a game . Python variable declarations and constructor confusion?

Python array/list instantiation, import and other declarations are confusing me!

In my code attached, I have a main class for holding the data structures for a platform game level, basically x,y, positions and length of the platform, for now,
I don't understand why the 'module' object is not callable - error? It seems it should be trivial. What does that mean? I intend to end up with a list of terrain objects
In, must I do 'import platform as platform' is that telling me how to call methods, get data from that class?

Who is Participating?
The reason is quite simple. The is the name of the file that implements the module platform. Inside the module, the class platform is defined. When you want to refer to the class from inside the module, you have to use both the module and the class identifiers. In your example, you should change the line to:
platf = platform.platform(290,290,500)

Open in new window

The first platform identifies the module, the second platform (after the dot) identifies the class.
beavoidAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.