what does it mean by defining a variable with double underscore only at the prefix part ?
like in this example at pastebin i.e. self.__weakReference
krystosan
0
Junior Poster
Recommended Answers
Jump to PostHere is an example ...
''' class_private101.py class variables and methods can be made private to the class ''' class C(object): ''' inheriting object is automatic in Python3 ''' # k is public to all instances of class C k = 1234 # variable names with double …
All 3 Replies
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.