projects
/
jinja2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ec1d2c
)
Different name for builtins in Python 3
author
Armin Ronacher
<armin.ronacher@active-4.com>
Tue, 20 Apr 2010 17:48:46 +0000
(19:48 +0200)
committer
Armin Ronacher
<armin.ronacher@active-4.com>
Tue, 20 Apr 2010 17:48:46 +0000
(19:48 +0200)
--HG--
branch : trunk
jinja2/utils.py
patch
|
blob
|
history
diff --git
a/jinja2/utils.py
b/jinja2/utils.py
index 8bf2c7f6883cd2439116bb2edc935cdb8e4361a0..0db4653e9f8208136b819ef14548b97b7557c42d 100644
(file)
--- a/
jinja2/utils.py
+++ b/
jinja2/utils.py
@@
-236,7
+236,8
@@
def object_type_repr(obj):
return 'None'
elif obj is Ellipsis:
return 'Ellipsis'
- if obj.__class__.__module__ == '__builtin__':
+ # __builtin__ in 2.x, builtins in 3.x
+ if obj.__class__.__module__ in ('__builtin__', 'builtins'):
name = obj.__class__.__name__
else:
name = obj.__class__.__module__ + '.' + obj.__class__.__name__