Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Perl allows you to change the definition of false to make it true. (And vice versa.)

by LanX (Canon)
on Dec 12, 2012 at 22:50 UTC ( #1008604=note: print w/ replies, xml ) Need Help??


in reply to Perl allows you to change the definition of false to make it true. (And vice versa.)

And as usual it's far easier in Python! ;-)

>python Python 2.5.2 (r252:60911, Jan 20 2010, 23:16:55) [GCC 4.3.2] on linux2 >>> False, True = True, False >>> False True >>> True False

Python rules obfuscation!

Cheers Rolf


Comment on Re: Perl allows you to change the definition of false to make it true. (And vice versa.)
Download Code
Re^2: Perl allows you to change the definition of false to make it true. (And vice versa.)
by tobyink (Abbot) on Dec 13, 2012 at 14:30 UTC

    Python allows you to redefine the "constants" True and False, but that doesn't change the behaviour of...

    >>> "foo"=="bar" False
    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
      So Python is easier to brake, but is incomplete in this attempt? ;-)

      Cheers Rolf

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1008604]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2015-07-03 03:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (47 votes), past polls