Jump to content

View more

Image of the Day

#ld38 #screenshotsaturday Mimosa Fizz action gif #2 https://t.co/TUzdppvfUL
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Question with Modules and Classes

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 Marzdor   Members   

180
Like
0Likes
Like

Posted 18 August 2013 - 12:38 AM

So I have been reading Learn Python The Hard Way 3rd edition, and I have recently gotten to Ex 40 which covers Modules, Classes, and Objects. Now to my understanding Modules and Classes do the same thing just with a different way of doing it. 

 

So my question is: Is there a reason to use a Module over a Class?

 

The reason I ask is Modules seem easier to write and call compared to classes for me. 



#2 King Mir   Members   

2490
Like
0Likes
Like

Posted 18 August 2013 - 02:18 AM

The difference is, a class can have multiple instances, but there's only one module.

#3 Marzdor   Members   

180
Like
0Likes
Like

Posted 18 August 2013 - 09:15 PM

Oh okay thanks






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.