Ask Your Question
0

What is the library-private parameter in Python?

asked 2022-07-31 11:00:00 +0000

huitzilopochtli gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2021-04-24 12:00:00 +0000

djk gravatar image

There is no "library-private" parameter in Python. However, in Python, variables and methods can be marked as private by prefixing them with a double underscore (__). This is called name mangling and is meant to indicate that the variable or method is intended to be used only within the class where it is defined and not by other parts of the code. However, it is not truly private, as it can still be accessed from outside the class by using the mangled name.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-07-31 11:00:00 +0000

Seen: 18 times

Last updated: Apr 24 '21