http://qs321.pair.com?node_id=11133327


in reply to Perl Contempt in My Workplace

For all the equivalencies between Perl and Python, I miss these most in Python:

And I don't care for the GIL, but it seems that's a big problem however you slice it, for many languages.

-QM
--
Quantum Mechanics: The dreams stuff is made of

Replies are listed 'Best First'.
Re^2: Perl Contempt in My Workplace
by LanX (Saint) on May 31, 2021 at 17:49 UTC

    > variable scope

    Python has function scope, I think you mean block scope.

    I'd add

    • Lambdas (= Ano. Subs) with more than one expression

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

      Python has function scope, I think you mean block scope.

      I literally meant the scope of variables. :D

      -QM
      --
      Quantum Mechanics: The dreams stuff is made of

        > the scope of variables. :D

        Python has 4 types of variable scope°

        Block scope like in Perl is none of them, with or without curlies.

        But this doesn't mean that "variable scope" is missing in Python.

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

        °) see also Re^2: Perl Contempt in My Workplace

Re^2: Perl Contempt in My Workplace
by eyepopslikeamosquito (Archbishop) on Jun 01, 2021 at 01:17 UTC

    Agreed! Especially Perl vs Python variable scope. This was discussed at length a few months ago -- see especially the many insightful replies from the LanX. :)