A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-April/003577.html below:

Arbitrary attributes on funcs and methods)

[Python-Dev] Object customization (was: Arbitrary attributes on funcs and methods) [Python-Dev] Object customization (was: Arbitrary attributes on funcs and methods)Skip Montanaro skip@mojam.com (Skip Montanaro)
Fri, 14 Apr 2000 17:00:30 -0500 (CDT)
Barry said "_" is effectively taken because it means something (at least when 
used a function?) to pygettext.  How about "__" then? 

    def bar():
       print __.x
    def foo():
       print __.x
    foo.x = "public"
    bar.x = "private"
    ...

It has the added benefit that this usage adheres to the "Python gets to
stomp on __-prefixed variables" convention.

my-underscore-key-works-better-than-yours-ly y'rs,

Skip



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4