mirror of https://github.com/python/cpython
Cleanup example
This commit is contained in:
parent
690d4ae8bf
commit
88fc66179b
|
@ -306,11 +306,10 @@ available. They are listed here in alphabetical order.
|
||||||
'unpack', 'unpack_from']
|
'unpack', 'unpack_from']
|
||||||
>>> class Shape(object):
|
>>> class Shape(object):
|
||||||
def __dir__(self):
|
def __dir__(self):
|
||||||
return ['area', 'perimter', 'location']
|
return ['area', 'perimeter', 'location']
|
||||||
|
>>> s = Shape()
|
||||||
>>> f = Shape()
|
>>> dir(s)
|
||||||
>>> dir(f)
|
['area', 'perimeter', 'location']
|
||||||
['area', 'perimter', 'location']
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue