You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hiroshi brought up that it'd be good to make env a class, and that was done in PR #629. Maybe it'd be a good idea to do something similar with params. It'd probably be simpler with params since they're "dumb" -- there's not any real handler logic involved in setting the params, so the class' constructor could just be passed the request object and set itself up.
As with env, if we made params a class we could reduce the risk of typos, because each parameter name could be defined as a property on the class. (TBH, what made me think of this was pylint complaining that Structs don't have members for various parameters we access as fields of the params variable.)
The text was updated successfully, but these errors were encountered:
Hiroshi brought up that it'd be good to make env a class, and that was done in PR #629. Maybe it'd be a good idea to do something similar with params. It'd probably be simpler with params since they're "dumb" -- there's not any real handler logic involved in setting the params, so the class' constructor could just be passed the request object and set itself up.
As with env, if we made params a class we could reduce the risk of typos, because each parameter name could be defined as a property on the class. (TBH, what made me think of this was pylint complaining that Structs don't have members for various parameters we access as fields of the
params
variable.)The text was updated successfully, but these errors were encountered: