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

Re^2: Python tricks

by pme (Prior)
on Dec 18, 2018 at 15:05 UTC ( #1227401=note: print w/replies, xml ) Need Help??

in reply to Re: Python tricks
in thread Python tricks

Your solution is better, more perlish.

Replies are listed 'Best First'.
Re^3: Python tricks
by xiaoyafeng (Chaplain) on Dec 19, 2018 at 07:21 UTC

    No, it's not perlish and please don't use it any more.

    $# is long deprecated, and will throw exception when using on 5.30 soon.

    Thank syphilis for pointing out my misunderstanding!

    I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

      $# is long deprecated

      It's true that the special perl variable $# is deprecated, but hippo is using "$#" in a different, quite allowable, context:
      C:\_32>perl -le "print $#;" $# is no longer supported as of Perl 5.30 at -e line 1. C:\_32>perl -wle "@x=(7,8,9);print $#x;" 2


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2019-11-19 02:35 GMT
Find Nodes?
    Voting Booth?
    Strict and warnings: which comes first?

    Results (93 votes). Check out past polls.