Python Forum
Python Forum
>
Python Coding
>
General Coding Help
> strange class property
Full Version:
strange class property
You're currently viewing a stripped down version of our content.
View the full version
with proper formatting.
KaliLinux
Nov-25-2019, 04:22 PM
Why does the following program output "python is hard" ?
class t: def __init__(self): self.__t="python is hard" t=t() print(t._t__t)
buran
Nov-25-2019, 04:27 PM
check
https://dbader.org/blog/meaning-of-under...-in-python
in particular - part 3. Double Leading Underscore: __var
KaliLinux
Nov-25-2019, 04:32 PM
Thanks!
Python Forum
>
Python Coding
>
General Coding Help
> strange class property