Skip to content

Commit

Permalink
Alias self.__dict__ in Request.__init__
Browse files Browse the repository at this point in the history
  • Loading branch information
ianb committed Jan 22, 2009
1 parent 202e1a3 commit 004fbdb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions webob/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,19 +520,20 @@ def __init__(self, environ=None, environ_getter=None, charset=NoDefault, unicode
if environ is not None and environ_getter is not None:
raise TypeError(
"You can only provide one of the environ and environ_getter arguments")
d = self.__dict__
if environ is None:
self.__dict__['_environ_getter'] = environ_getter
d['_environ_getter'] = environ_getter
else:
if not isinstance(environ, dict):
raise TypeError(
"Bad type for environ: %s" % type(environ))
self.__dict__['_environ'] = environ
d['_environ'] = environ
if charset is not NoDefault:
self.__dict__['charset'] = charset
d['charset'] = charset
if unicode_errors is not NoDefault:
self.__dict__['unicode_errors'] = unicode_errors
d['unicode_errors'] = unicode_errors
if decode_param_names is not NoDefault:
self.__dict__['decode_param_names'] = decode_param_names
d['decode_param_names'] = decode_param_names
if kw:
my_class = self.__class__
for name, value in kw.iteritems():
Expand Down

0 comments on commit 004fbdb

Please sign in to comment.