Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Did you know you can search for your assignmet answers on Google?
@lmgtfy python lambda use cases -
Doing a full blown class would decrease performance
Doing strings make a heavier codebase
Passing a dict around feels dirty -
If I'm understanding the question correctly, I seem to recall settling on throwing dictionaries around as my preferred solution to a similar situation. If memory serves, the way python will handle it is essentially "pass by reference", so there's no big performance implication. And that way you can access multiple keys without having to pass them all individually.
Related Rants
Design question for y'all
Context: python lambda
Better to make classes for dictionary objects holding strings between methods
Throw strings around separately
Throw the dictionary around
question
string
python3
dictionary
class