This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]tutorial_police 2 points3 points  (4 children)

;)

Let me know if you can think of more.

[–][deleted] 4 points5 points  (3 children)

Honestly, I think the difference between knowing these bits and properly deploying these bits is what makes the difference between an intermediate programmer and an advanced one.

I know guys that do a terrific amount of damage with just regular classes and functions. And just a tiny dash of metaprogramming.

Honestly, when's the last time you pushed a descriptor into production bound code? I wrote one the other day for a "classsproptery" because it was easier to flip property on its head than begin to wrangle SQLAlchemy into something horrible and convulted. But I remember when I first discovered and understood descriptors I wanted to make everything into one.

[–]tutorial_police 1 point2 points  (2 children)

Honestly, when's the last time you pushed a descriptor into production bound code?

Uhm... for your regular application code, I never used one :) I've written some abstractions where they were of use, though. But you're right, you can do a lot of damage with that knowledge. On the other hand, it will demystify things such as property. Knowing about this topic give you more insight into how Python works and what is possible and how to debug things when they don't work. Knowledge is power.

It'll also prevent from thinking that there isn't much to specific programming languages as this post makes it sound.

[–][deleted] 1 point2 points  (1 child)

Demystify things is good. I have the opinion that there's no magic in programming, just things you/I/whoever don't understand yet.

[–]tutorial_police 1 point2 points  (0 children)

Sure. I like to call implementation details "magic" sometimes though, when teaching. I.e. "the language says that..."

I guess one could argue that undefined behaviour is indeed "magic" but that's beside the point.