All Questions
3 questions
4
votes
2
answers
119
views
Is there any good/fundamental reason that Python classvars, and JavaScript prototype inheritance, don't mutate the parent on assignment?
In Python, if you have a classvar, it's accessible from an instance, but if you set the variable on the instance it doesn't actually change the classvar, rather it assigns a new name which shadows the ...
10
votes
4
answers
2k
views
Why do python generators and functions share the "def" keyword?
Consider the following:
def some_function():
return 1
def some_generator():
yield 1
In the code above, some_function is a function, while some_generator is a generator. They look quite ...
3
votes
3
answers
281
views
Use the latest technology or use a mature technology as a developer?
I would like to develop an application for a group of people to use. I have decided to develop using python, but I am thinking of using python 2.X or python 3.X. If I use python 2.X, I need to upgrade ...