Changeset 2341
- Timestamp:
- 02/18/06 14:34:14 (3 years ago)
- Files:
-
- django/trunk/AUTHORS (modified) (1 diff)
- django/trunk/django/contrib/syndication/feeds.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/AUTHORS
r2326 r2341 62 62 Jason Huggins <http://www.jrandolph.com/blog/> 63 63 Michael Josephson <http://www.sdjournal.com/> 64 junzhang.jn@gmail.com 64 65 Russell Keith-Magee <freakboy@iinet.net.au> 65 66 Garth Kidd <http://www.deadlybloodyserious.com/> django/trunk/django/contrib/syndication/feeds.py
r1228 r2341 34 34 return default 35 35 if callable(attr): 36 try: 36 # Check func_code.co_argcount rather than try/excepting the 37 # function and catching the TypeError, because something inside 38 # the function may raise the TypeError. This technique is more 39 # accurate. 40 if hasattr(attr, 'func_code'): 41 argcount = attr.func_code.co_argcount 42 else: 43 argcount = attr.__call__.func_code.co_argcount 44 if argcount == 2: # one argument is 'self' 37 45 return attr(obj) 38 e xcept TypeError:46 else: 39 47 return attr() 40 48 return attr
