Skip to content
Myr

Different name for builtins in Python 3

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent 2ec1d2c · Browse files · 1 file+2 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−1 removed

  • other:+2 added−1 removed

1 file+2 added−1 removed

modified:jinja2/utils.py+2 added-1 removed
234 unmodified lines
235 if obj is None:236 return 'None'237 elif obj is Ellipsis:238 return 'Ellipsis'239 if obj.__class__.__module__ == '__builtin__':239 # __builtin__ in 2.x, builtins in 3.x240 if obj.__class__.__module__ in ('__builtin__', 'builtins'):241 name = obj.__class__.__name__242 else:243 name = obj.__class__.__module__ + '.' + obj.__class__.__name__244 return '%s object' % name
575 unmodified lines