Re: Equivalent code to the bool() built-in function



On Sun, Apr 17, 2011 at 9:53 PM, Chris Angelico <rosuav@xxxxxxxxx> wrote:
On Mon, Apr 18, 2011 at 2:40 PM, Ned Deily <nad@xxxxxxx> wrote:
<snip>
Even better:
$ python2.7 -c 'False = True; print False'
True

http://bofh.ch/bofh/bofh13.html

Alas:
$ python3 -c 'False = True; print(False)'
 File "<string>", line 1
SyntaxError: assignment to keyword

Someone in Python3 dev thinks it's a bad idea to shoot yourself in the foot.

Remind me some day to finish work on my "ultimate programming
language", which starts out with a clean slate and lets the programmer
define his own operators and everything.

Pro: The expression evaluator can be taught to interpret Dungeons &
Dragons notation - 2d6 means "random(1,6)+random(1,6)".
Con: The same expression might mean something completely different in
another program.

Pro: You can do anything.
Con: You can do anything.

I think someone already beat you to it. They call their invention "Lisp". :-P

Cheers,
Chris
.



Relevant Pages

  • Recommended C#/.NET Book
    ... Programming Microsoft .NET by Jeff Prosise ... Programming Windows with C# by Charles Petzold ... Pro: Complete - discusses all GUI tools, ... Con: Fundamental - many examples of Windows Forms and no advanced design including multithreading, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Equivalent code to the bool() built-in function
    ... Remind me some day to finish work on my "ultimate programming ... The expression evaluator can be taught to interpret Dungeons & ... Pro: You can do anything. ... Con: You can do anything. ...
    (comp.lang.python)
  • Re: Recommended C#/.NET Book
    ... > Programming Microsoft .NET by Jeff Prosise ... > Pro: Extensive coverage of CRT and .NET ... > Con: Overrated, lacking advanced subjects including multithreading, etc. ... you can download some of this books ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Did somebody mention a party at Worldcon?
    ... I haven't looked at the programming at all! ... by and see if you are at con or not. ... Jay and I and other folks decided to bid for Babylon 5 for 2258 (Talia ... So, we made bid books (support us now so your great, great grandkids ...
    (rec.arts.sf.tv.babylon5.moderated)
  • Re: Compass Software
    ... As for am I a pro or a DIY, ... I usually work with DSC systems, so I have some programming ... |>>house poor. ...
    (alt.security.alarms)