Changes between Version 6 and Version 7 of ClassBasedViews
- Timestamp:
- Oct 1, 2010, 2:55:22 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ClassBasedViews
v6 v7 66 66 Arguments against: 67 67 * The "copy on !__call!__()" approach is a little messy. Normal Python idiom wouldn't lead users to expect that !__call!__() would cause a copy to be created. 68 * The abstraction of the copy-on-call can leak in surprising ways. Some users will try to set up state using an __init__ method (common practice). If any of the state they attach to self in __init__ is mutable (list, dict, etc) and they mutate it in the view, this is once again un-threadsafe (but will appear to work fine locally).68 * The abstraction of the copy-on-call can leak in surprising ways. Some users will try to set up state using an !__init!__ method (common practice). If any of the state they attach to self in !__init!__ is mutable (list, dict, object, etc) and they mutate it in the view, this is once again un-threadsafe (but will appear to work fine locally). 69 69 70 70 ==== !__new!__() ====