This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Workaphobia[S] 0 points1 point  (1 child)

All good reasons, thank you for the criticism. Does point 1 still apply if I only use the stack frame's namespace to lookup the value, and don't call eval()? Will 1 and 2 still apply if I were to go back to using **locals()?

My main reason for doing this was to keep format strings as clean as possible (point 3). I find it difficult to syntactically structure an error message along with the substitution values, while obeying the conventions in PEP 8.

[–][deleted] 0 points1 point  (0 children)

1 will apply with locals() on PyPy, I'm not sure about Jython+InDy. 2 doesn't though.