Ten awesome things you are missing out on if you're still using Python 2

jladasky at itu.edu jladasky at itu.edu
Mon May 8 22:07:14 EDT 2017


On Monday, May 8, 2017 at 5:09:33 PM UTC-7, justin walters wrote:
> On Mon, May 8, 2017 at 3:40 PM, <j...y at itu.edu> wrote:
> 
> > Slide 15:
> >
> > > def sum(a, b, biteme=False):
> > >     if biteme:
> > >         shutil.rmtree('/')
> > >     else:
> > >         return a + b
> >
> > Now that's just evil.  :^)
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> >
> 
> I sincerely hope no-one is trying to run this example as root.

To be fair, the import statement that would make this code truly evil was thoughtfully left off.



More information about the Python-list mailing list