Announcement

Collapse
No announcement yet.

Python 3.4 Steps Closer With New Features

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Python 3.4 Steps Closer With New Features

    Phoronix: Python 3.4 Steps Closer With New Features

    The second alpha release of Python 3.4 is now available and with it comes a range of improvements over Python 3.3...

    http://www.phoronix.com/vr.php?view=MTQ1NzY

  • #2
    Umph. Hope it is at least keeping compatibility. I mean, new features and fixes are a good thing but in the past Python didn't seem to be too compatible among versions. Which sucks since quite a bunch of things rely on it (and not only on Gentoo).

    Comment


    • #3
      Originally posted by Adarion View Post
      Umph. Hope it is at least keeping compatibility. I mean, new features and fixes are a good thing but in the past Python didn't seem to be too compatible among versions. Which sucks since quite a bunch of things rely on it (and not only on Gentoo).
      Python kept backwards-compatibility up through 2.7. 3.0-3.3 had some breaks, but I think the 3.x releases have been backwards-compatible since 3.3.

      Comment


      • #4
        Interfaces

        Python still doesn't have;
        * public/private/protected access modifiers.
        * Class interfaces, abstract classes, etc

        Python is great for small scripts, but I am not sure if its any good for big projects with services, repositories and multiple backends and pluggable modules.

        Comment


        • #5
          Yeah, because python is a functional language.

          Comment


          • #6
            Originally posted by uid313 View Post
            Python still doesn't have;
            * public/private/protected access modifiers.
            It does have private methods and attributes, but they aren't strictly enforced (by design).

            Originally posted by uid313 View Post
            * Class interfaces, abstract classes, etc
            Yes it does. See, e.g. Abstract Base Classes

            Originally posted by uid313 View Post
            Python is great for small scripts, but I am not sure if its any good for big projects with services, repositories and multiple backends and pluggable modules.
            You mean like some of the most popular web applications and frameworks?
            Last edited by TheBlackCat; 09-10-2013, 05:57 AM.

            Comment


            • #7
              Originally posted by TheBlackCat View Post
              It does have private methods and attributes, but they aren't strictly enforced (by design).
              > private def foo():
              SyntaxError: invalid syntax

              > def private foo():
              SyntaxError: invalid syntax

              Originally posted by TheBlackCat View Post
              Yes it does. See, e.g. Abstract Base Classes
              That is weird, you don't have any interface keyword or abstract keyword.
              It is difficult to understand and not intuitive.
              It feels more like hacked on, than intelligently designed.

              Originally posted by TheBlackCat View Post
              You mean like some of the most popular web applications and frameworks?
              Cant be fun to code multiple database backends or pluggable authentication or such.

              Then it is much nicer to code in PHP, Java or C# which has real object-oriented programming.

              Comment


              • #8
                Originally posted by prodigy_ View Post
                Yeah, because python is a functional language.
                It is a multi-paradigm language, so its functional, object-oriented and reflective.
                But the OO part seems tacky.

                Even PHP have better OO and PHP wasn't even originally designed with OOP in mind, it was plastered on in PHP 5.

                Comment


                • #9
                  Originally posted by uid313 View Post
                  > private def foo():
                  SyntaxError: invalid syntax

                  > def private foo():
                  SyntaxError: invalid syntax
                  Code:
                  >>> def _foo():
                  ...    print 'hello world'
                  ...
                  >>> _foo()
                  hello world
                  Originally posted by uid313 View Post
                  That is weird, you don't have any interface keyword or abstract keyword.
                  It is difficult to understand and not intuitive.
                  It feels more like hacked on, than intelligently designed.
                  In other words:
                  "Python doesn't have ___"
                  "Yes it does"
                  "It uses a different syntax than I am used to so it doesn't count"

                  Originally posted by uid313 View Post
                  Cant be fun to code multiple database backends or pluggable authentication or such.
                  Are you kidding? Do you have any idea how many database and authentication backends there are for python, or how many are supported by major python web frameworks?

                  Who am I kidding, of course you have no idea.

                  Originally posted by uid313 View Post
                  Then it is much nicer to code in PHP, Java or C# which has real object-oriented programming.
                  Python has "real object-oriented programming". "different syntax" != "not real".

                  But I am sure you know web frameworks and applications much better than Sourceforge, Google, DropBox, Mozilla, Instigram, Reddit, Opera, or Digg, just to name a few.

                  Comment


                  • #10
                    Originally posted by TheBlackCat View Post
                    Python has "real object-oriented programming". "different syntax" != "not real".
                    Prefixing method names with underscore isn't OOP and doesn't make it private.
                    It is just you pretending that it is private.

                    Comment


                    • #11
                      Originally posted by uid313 View Post
                      Prefixing method names with underscore isn't OOP and doesn't make it private.
                      It is just you pretending that it is private.
                      First, again, just because the syntax is different than you are used to does not make it wrong.

                      Second, supporting private methods is not a requirement for a language to be object-oriented, nor is it necessary to do any of the things you claim (falsely) that Python is bad at.

                      Third, I notice you completely ignored the rest of my reply.
                      Last edited by TheBlackCat; 09-10-2013, 10:05 AM.

                      Comment


                      • #12
                        Originally posted by uid313 View Post
                        Prefixing method names with underscore isn't OOP and doesn't make it private.
                        It is just you pretending that it is private.
                        https://mail.python.org/pipermail/tu...er/025932.html

                        https://plus.google.com/115212051037...ts/7wpbQTPRWft

                        Comment


                        • #13
                          Besides, everything in Python is an object -- whether you like it or not.

                          Comment


                          • #14
                            Originally posted by uid313 View Post
                            Python still doesn't have;
                            * public/private/protected access modifiers.
                            * Class interfaces, abstract classes, etc
                            It's by design - it will never have those.
                            You can actually do public/private and abstract classes if you want; however you can also chose to fuck it if you want.
                            As a developer, this is why I love Python. It doesn't assume I'm a baby.

                            Comment


                            • #15
                              Private functions in Python

                              Code:
                              # the following function is private, do NOT touch it
                              def _foo()

                              Comment

                              Working...
                              X