|
|
|
|
|
by aorist
1063 days ago
|
|
> The underscore _ can be used as a throwaway variable to discard unwanted values: So can any other variable, using underscore is just a convention to make it obvious that you're not planning to re-use it (it doesn't get GCed more aggressively or anything). Similarly, private methods being prefixed with an underscore is also just a convention, you can access them from anywhere. However, double underscores are used for magic attributes and name mangling for class attributes, which are interpreted differently! (See: https://stackoverflow.com/a/1301369) |
|