Hacker News new | ask | show | jobs
by nik 6282 days ago
"print(random.choice(['svn', 'bzr', 'hg', 'git']))"

This actually printed "hg" for me the first time I ran it.

4 comments

Oh noes, they've removed this piece just after I saw it. It used to say:

Chosen DVCS

  import random
  print(random.choice(['svn', 'bzr', 'hg', 'git']))
http://svn.python.org/view/peps/trunk/pep-0374.txt?r1=70206&...

  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  NameError: name 'random' is not defined
You need to edit your ipythonrc so that useful modules like random are imported for you automatically.
Weird, I got hg too...

And git came on 12th try.

Printed git for me. Phew.