File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 constructor, with the same signature as the builtin open() function.
2020 file() is now the preferred way to open a file.
2121
22+ - In 2.2a3, *for new-style classes only*, __getattr__ was called for
23+ every attribute access. This was confusing because it differed
24+ significantly from the behavior of classic classes, where it was
25+ only called for missing attributes. Now, __getattr__ is called only
26+ if regular attribute access raises AttributeError; to catch *all*
27+ attribute access, *for new-style classes only*, you can use
28+ __getattribute__. If both are defined, __getattribute__ is called
29+ first, and if it raises AttributeError, __getattr__ is called.
30+
2231- In 2.2a3, __new__ would only see sequential arguments passed to the
2332 type in a constructor call; __init__ would see both sequential and
2433 positional arguments. This made no sense whatsoever any more, so
You can’t perform that action at this time.
0 commit comments