0

people who know python come

posted in Off Topic
Comments:
Threaded Linear
#1
kalayav_n

arent classes just useless? you can just use a dict or in most cases just save it in a picke...

#2
saebr
7
Frags
+

classes aren't entirely useless, some people prefer learning in a structured environment with an expert guiding them along and helping them when they are lost or need assistance!

#3
pett
1
Frags
+

Classes in python aren't useless. Good code is more than just getting the thing to work. Classes provide an opportunity for the programmer to define an informative and descriptive interface for the logic being encapsulated. Instance/Class methods, constructor methods, and Meta classes allow for that!

Jamming everything into a dictionary, is, as you point out, sometimes possible, but would frequently sacrifice opportunities to organize the logic in a way that makes it easier for someone reading your code to understand how it works and what you were trying to accomplish.

#4
Bigpoopy
1
Frags
+

what this guy said. wait til you are working with hundreds of files and you'll see. not to mention working with teammates.

  • Preview
  • Edit
› check that that your post follows the forum rules and guidelines or get formatting help
Sign up or log in to post a comment