Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Python gave me a colonic

by Paladin (Vicar)
on Aug 24, 2020 at 22:46 UTC ( [id://11121060]=note: print w/replies, xml ) Need Help??


in reply to Python gave me a colonic (solved - brainfart)

It is valid code. else: is a label, and LABEL BLOCK is valid perl syntax.

Replies are listed 'Best First'.
Re^2: Python gave me a colonic
by LanX (Saint) on Aug 24, 2020 at 23:21 UTC
    Correct, but

    > LABEL BLOCK is valid perl syntax.

    to be more precise

    LABEL: and { NAKED BLOCK } are already valid in isolation, they don't need to be compounded.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

Re^2: Python gave me a colonic
by bobn (Chaplain) on Aug 25, 2020 at 00:50 UTC
    OK, then, yes, it's a label. I saw else with a colon and didn't even think about labels, even though I've used them many times over the years.

    Actually, it seems a little odd that a keyword is permitted to be used in this fashion, but whatever.

    Thanks for the explanation. I'm gonna blame it on Guido, lol.

    --Bob Niederman, http://bob-n.com

    All code given here is UNTESTED unless otherwise stated.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2024-04-26 07:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found