[Tutor] best way to dynamically set class variables?
Albert-Jan Roskam
sjeik_appie at hotmail.com
Sat Nov 10 02:49:57 EST 2018
On 10 Nov 2018 01:03, Steven D'Aprano <steve at pearwood.info> wrote:
On Thu, Nov 08, 2018 at 11:34:35AM -0500, Avi Gross wrote:
> An interesting discussion that is outside the scope of a group like this is
> HOW malicious things can be done and perhaps how to avoid them.
>
Isn't the rule, simply:
this_is_stupid = eval(input("please enter malicious code: "))
... and other uses range from 'code smell' to 'elegant' (where namedtuple is an example of the latter)
More information about the Tutor
mailing list