Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

step.hashes and it's sub-dictionaries must be immutable #112

gabrielfalcao opened this Issue Mar 23, 2011 · 2 comments


None yet
3 participants

gabrielfalcao commented Mar 23, 2011

Either step.hashes list and its contents (each dict) must be immutable, as for if the developer put some non-string value in the dictionary, lettuce will get crazy when trying to calculate the line length.

other approach, which is way nicer, would be if lettuce keep a backup of the original version of each dict, so that even if he modifies the dict, lettuce will use the backed-up version when doing calculation


ajtack commented Apr 4, 2011

I have encountered this in my use of the hashes. Suggestion: when printing the grey, "not done yet" grey color, just memorize the string that was printed instead of calculating the whole thing a second time. This way, hashes don't need to be immutable, but output is safe.


danni commented Feb 12, 2014

max_length calculations are now memoized in #429

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment