Serhiy Storchaka writes:
> They have. Both function and type classes have constructors
Ah, right. "First-class values", of course they do.
Thanks!
Steve
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to pytho
Hi Serhiy
Thank you for so clearly explaining how names get passed to function and
class constructors.
You also wrote:
> We do not have generalized way to call arbitrary constructor with
> automatically passing __name__, __qualname__ and __module__. And it would
> be convenient.
>
> create n
24.10.21 15:20, Stephen J. Turnbull пише:
> What do you mean by "constructor" here? Normally that word refers to
> methods that populate the attributes of instances (in Python, __init__
> and__new__). But functions and methods don't have such, so you must
> mean something else?
They have. Both f
Jonathan Fine writes:
> >From my phone.
>
> An important thing about def x and class A is that the strings x and A are
> made available to the constructor for x and A respectively.
What do you mean by "constructor" here? Normally that word refers to
methods that populate the attributes of in
>From my phone.
An important thing about def x and class A is that the strings x and A are
made available to the constructor for x and A respectively. The same is not
true for x=val.
Jonathan
___
Python-ideas mailing list -- python-ideas@python.org
To u
Why would anyone want to type:
def variable = value
when they could just type:
variable = value
instead? Perhaps if I was being paid by the character typed...
def my__really__good__variable = ( value )# Assign value to
my__really__good__variable.
*wink*
But all joking