File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1386,11 +1386,16 @@ copy of the windows error code.
13861386 The default mode which is used to load shared libraries. On OSX 10.3, this is
13871387 *RTLD_GLOBAL *, otherwise it is the same as *RTLD_LOCAL *.
13881388
1389- Instances of these classes have no public methods, however :meth: `__getattr__ `
1390- and :meth: `__getitem__ ` have special behavior: functions exported by the shared
1391- library can be accessed as attributes of by index. Please note that both
1392- :meth: `__getattr__ ` and :meth: `__getitem__ ` cache their result, so calling them
1393- repeatedly returns the same object each time.
1389+ Instances of these classes have no public methods. Functions exported by the
1390+ shared library can be accessed as attributes or by index. Please note that
1391+ accessing the function through an attribute caches the result and therefore
1392+ accessing it repeatedly returns the same object each time. On the other hand,
1393+ accessing it through an index returns a new object each time:
1394+
1395+ >>> libc.time == libc.time
1396+ True
1397+ >>> libc[' time' ] == libc[' time' ]
1398+ False
13941399
13951400The following public attributes are available, their name starts with an
13961401underscore to not clash with exported function names:
You can’t perform that action at this time.
0 commit comments