Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Why I don't use python

Why I don't use python

Scheduled Pinned Locked Moved The Lounge
designhelppythoncomgraphics
39 Posts 15 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H honey the codewitch

    It makes me feel like a crotchety old English teacher.

    def receive_message(self, client, client_address)

    Yields "'function' object has no attribute 'receive_message' And my first thought does not go to the code, but to the inanity of the error message. 1. Attributes are metadata. A function doesn't have attributes unless it's marked up. it has a signature, access modifies and storage class indicators. 2. Functions are not "objects". Functions are functions. A function as an object is called a "functor" 3. Am I really fisking a python error message right now? And by then I've completely given up on the issue.

    Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

    Richard DeemingR Offline
    Richard DeemingR Offline
    Richard Deeming
    wrote on last edited by
    #4

    Great - now I've got Bob Geldof singing in my head! :laugh: 🎵 Tell me why 🎵 🎵 I don't use Py-thon 🎵


    "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

    "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

    P 1 Reply Last reply
    0
    • Richard DeemingR Richard Deeming

      Great - now I've got Bob Geldof singing in my head! :laugh: 🎵 Tell me why 🎵 🎵 I don't use Py-thon 🎵


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #5

      It's nice that he does personal visits now. Has he fallen on hard times?

      Advanced TypeScript Programming Projects

      Richard DeemingR 1 Reply Last reply
      0
      • H honey the codewitch

        It makes me feel like a crotchety old English teacher.

        def receive_message(self, client, client_address)

        Yields "'function' object has no attribute 'receive_message' And my first thought does not go to the code, but to the inanity of the error message. 1. Attributes are metadata. A function doesn't have attributes unless it's marked up. it has a signature, access modifies and storage class indicators. 2. Functions are not "objects". Functions are functions. A function as an object is called a "functor" 3. Am I really fisking a python error message right now? And by then I've completely given up on the issue.

        Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

        C Offline
        C Offline
        Chris Maunder
        wrote on last edited by
        #6

        Yeah, naming is hard especially when you're trying to be consistent. In Python everything is an object, a "thing", and those things have "attributes". - An attribute that holds a value is a variable. - An attribute that is a function is called a method. - An attribute that represents a value accessed by getters/setters is call a property. So a function is an object and a parameter to the function object is, at its core, an attribute. But a class is also an object. And an instance of the class is an object. And operators are objects. Naming is hard.

        cheers Chris Maunder

        H 1 Reply Last reply
        0
        • P Pete OHanlon

          It's nice that he does personal visits now. Has he fallen on hard times?

          Advanced TypeScript Programming Projects

          Richard DeemingR Offline
          Richard DeemingR Offline
          Richard Deeming
          wrote on last edited by
          #7

          If he had, I'm sure he wouldn't be shy about asking people to give him their :elephant:ing money. :-D


          "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

          "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

          1 Reply Last reply
          0
          • H honey the codewitch

            It makes me feel like a crotchety old English teacher.

            def receive_message(self, client, client_address)

            Yields "'function' object has no attribute 'receive_message' And my first thought does not go to the code, but to the inanity of the error message. 1. Attributes are metadata. A function doesn't have attributes unless it's marked up. it has a signature, access modifies and storage class indicators. 2. Functions are not "objects". Functions are functions. A function as an object is called a "functor" 3. Am I really fisking a python error message right now? And by then I've completely given up on the issue.

            Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

            A Offline
            A Offline
            Amarnath S
            wrote on last edited by
            #8

            Add some ego and rename self to myself.

            1 Reply Last reply
            0
            • H honey the codewitch

              It makes me feel like a crotchety old English teacher.

              def receive_message(self, client, client_address)

              Yields "'function' object has no attribute 'receive_message' And my first thought does not go to the code, but to the inanity of the error message. 1. Attributes are metadata. A function doesn't have attributes unless it's marked up. it has a signature, access modifies and storage class indicators. 2. Functions are not "objects". Functions are functions. A function as an object is called a "functor" 3. Am I really fisking a python error message right now? And by then I've completely given up on the issue.

              Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

              D Offline
              D Offline
              Daniel Pfeffer
              wrote on last edited by
              #9

              I don't use Python because it solves no problems that I can't solve better with other tools.

              Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

              T 0 2 Replies Last reply
              0
              • C Chris Maunder

                Yeah, naming is hard especially when you're trying to be consistent. In Python everything is an object, a "thing", and those things have "attributes". - An attribute that holds a value is a variable. - An attribute that is a function is called a method. - An attribute that represents a value accessed by getters/setters is call a property. So a function is an object and a parameter to the function object is, at its core, an attribute. But a class is also an object. And an instance of the class is an object. And operators are objects. Naming is hard.

                cheers Chris Maunder

                H Offline
                H Offline
                honey the codewitch
                wrote on last edited by
                #10

                What a mess :laugh:

                Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                L 1 Reply Last reply
                0
                • Richard Andrew x64R Richard Andrew x64

                  Which release of python are you using? Do you have a choice of different implementations?

                  The difficult we do right away... ...the impossible takes slightly longer.

                  H Offline
                  H Offline
                  honey the codewitch
                  wrote on last edited by
                  #11

                  Dunno which release, and yes I have a choice of alternatives. I choose C#. :)

                  Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                  1 Reply Last reply
                  0
                  • H honey the codewitch

                    What a mess :laugh:

                    Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #12

                    honey the codewitch wrote:

                    What a mess

                    Have you ever tried SmallTalk? And really Python is not that difficult once you get used to its rules; it's just a bit different than some other languages.

                    H 1 Reply Last reply
                    0
                    • L Lost User

                      honey the codewitch wrote:

                      What a mess

                      Have you ever tried SmallTalk? And really Python is not that difficult once you get used to its rules; it's just a bit different than some other languages.

                      H Offline
                      H Offline
                      honey the codewitch
                      wrote on last edited by
                      #13

                      I've seen SmallTalk - i think maybe in the late 80s early 90s? Been so long i don't even remember. Never tried it myself. I'm biased against languages that pretend to be something they're not. I know it's silly of me, but JS and Python with their ersatz OOP (that's not OOP) just leave me with a bad taste in my mouth. I dislike it I think for the same reasons I dislike Turkey-Bacon. Turkey is fine. Bacon is fine. Everything would be fine if they'd just stay in their lane. :~ Objects are fine. Associative arrays are fine. Associative arrays are not objects no matter how many functors you put into them.

                      Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                      C M 2 Replies Last reply
                      0
                      • H honey the codewitch

                        I've seen SmallTalk - i think maybe in the late 80s early 90s? Been so long i don't even remember. Never tried it myself. I'm biased against languages that pretend to be something they're not. I know it's silly of me, but JS and Python with their ersatz OOP (that's not OOP) just leave me with a bad taste in my mouth. I dislike it I think for the same reasons I dislike Turkey-Bacon. Turkey is fine. Bacon is fine. Everything would be fine if they'd just stay in their lane. :~ Objects are fine. Associative arrays are fine. Associative arrays are not objects no matter how many functors you put into them.

                        Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                        C Offline
                        C Offline
                        Chris Maunder
                        wrote on last edited by
                        #14

                        This sounds like me ranting that 'invite' is a verb not a noun, and 'alternate' means to switch from one option to another, and is not an alterative. Damn kids these days...

                        cheers Chris Maunder

                        1 Reply Last reply
                        0
                        • D Daniel Pfeffer

                          I don't use Python because it solves no problems that I can't solve better with other tools.

                          Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                          T Offline
                          T Offline
                          theoldfool
                          wrote on last edited by
                          #15

                          Putting my "your programming language wears army shorts", or "Scripting programs aren't programming languages". Biases aside, I think it can come in handy for one off stuff and quick and dirty test stuff. I am working with some IoT devices that send data to a metered service (cloud). For testing/enhancing (can you say debug?) :) I found a quick and dirty script for a python syslog server (yes I have a C## version but it does a bunch of parsing) that just prints what it receives.

                          import socketserver
                          class MyUDPHandler(socketserver.BaseRequestHandler):
                          def handle(self):
                          print(self.request[0].decode())
                          with socketserver.UDPServer(('10.0.2.4', 514), MyUDPHandler) as server:
                          server.serve_forever()

                          gets: The temperature in Fahrenheit is:77.9 166 The temperature in Celsius is:25.5 But then, I am the lazy old fool. Edit: I can run it on my Pi (just got a 5!)

                          >64 There is never enough time to do it right, but there is enough time to do it over.

                          H D 2 Replies Last reply
                          0
                          • T theoldfool

                            Putting my "your programming language wears army shorts", or "Scripting programs aren't programming languages". Biases aside, I think it can come in handy for one off stuff and quick and dirty test stuff. I am working with some IoT devices that send data to a metered service (cloud). For testing/enhancing (can you say debug?) :) I found a quick and dirty script for a python syslog server (yes I have a C## version but it does a bunch of parsing) that just prints what it receives.

                            import socketserver
                            class MyUDPHandler(socketserver.BaseRequestHandler):
                            def handle(self):
                            print(self.request[0].decode())
                            with socketserver.UDPServer(('10.0.2.4', 514), MyUDPHandler) as server:
                            server.serve_forever()

                            gets: The temperature in Fahrenheit is:77.9 166 The temperature in Celsius is:25.5 But then, I am the lazy old fool. Edit: I can run it on my Pi (just got a 5!)

                            >64 There is never enough time to do it right, but there is enough time to do it over.

                            H Offline
                            H Offline
                            honey the codewitch
                            wrote on last edited by
                            #16

                            Not really that much harder to do on an ESP32 under Arduino. And it's $12 w/ a screen included.

                            Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                            T 1 Reply Last reply
                            0
                            • H honey the codewitch

                              Not really that much harder to do on an ESP32 under Arduino. And it's $12 w/ a screen included.

                              Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                              T Offline
                              T Offline
                              theoldfool
                              wrote on last edited by
                              #17

                              easy is one of my favorite 4 letter words. Comes right after the 4 letter word that starts with an F.... Free. :)

                              >64 There is never enough time to do it right, but there is enough time to do it over.

                              H 1 Reply Last reply
                              0
                              • T theoldfool

                                Putting my "your programming language wears army shorts", or "Scripting programs aren't programming languages". Biases aside, I think it can come in handy for one off stuff and quick and dirty test stuff. I am working with some IoT devices that send data to a metered service (cloud). For testing/enhancing (can you say debug?) :) I found a quick and dirty script for a python syslog server (yes I have a C## version but it does a bunch of parsing) that just prints what it receives.

                                import socketserver
                                class MyUDPHandler(socketserver.BaseRequestHandler):
                                def handle(self):
                                print(self.request[0].decode())
                                with socketserver.UDPServer(('10.0.2.4', 514), MyUDPHandler) as server:
                                server.serve_forever()

                                gets: The temperature in Fahrenheit is:77.9 166 The temperature in Celsius is:25.5 But then, I am the lazy old fool. Edit: I can run it on my Pi (just got a 5!)

                                >64 There is never enough time to do it right, but there is enough time to do it over.

                                D Offline
                                D Offline
                                Daniel Pfeffer
                                wrote on last edited by
                                #18

                                I didn't say that Python is useless; I said that I have no use for it.

                                Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                                T 1 Reply Last reply
                                0
                                • D Daniel Pfeffer

                                  I didn't say that Python is useless; I said that I have no use for it.

                                  Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                                  T Offline
                                  T Offline
                                  theoldfool
                                  wrote on last edited by
                                  #19

                                  Well, I never thought you said that. Seems to me that, on this forum, the washed like to pile on the unwashed. Back to lurking.

                                  >64 There is never enough time to do it right, but there is enough time to do it over.

                                  D 1 Reply Last reply
                                  0
                                  • T theoldfool

                                    easy is one of my favorite 4 letter words. Comes right after the 4 letter word that starts with an F.... Free. :)

                                    >64 There is never enough time to do it right, but there is enough time to do it over.

                                    H Offline
                                    H Offline
                                    honey the codewitch
                                    wrote on last edited by
                                    #20

                                    Well, to be clear I'm not saying it's either easy or free. But Arduino does lower the bar for entry into C++ development significantly, even if it's not the best code. Frankly, RPis are a bit heavy handed, and are priced to match. It's a whole lot more machine than you need for most IoT purposes, and I tend to think of them more as a mini PC than an IoT widget. The ESP32 has wifi and bluetooth built in, and can do most anything with sensors and such you can do with an RPi, sometimes better, because it's realtime, but without the $100+ price tag, the power consumption, the size, the desk space requirements while coding it, etc.

                                    Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                                    1 Reply Last reply
                                    0
                                    • T theoldfool

                                      Well, I never thought you said that. Seems to me that, on this forum, the washed like to pile on the unwashed. Back to lurking.

                                      >64 There is never enough time to do it right, but there is enough time to do it over.

                                      D Offline
                                      D Offline
                                      Daniel Pfeffer
                                      wrote on last edited by
                                      #21

                                      theoldfool wrote:

                                      the washed like to pile on the unwashed.

                                      I apologize for my misunderstanding.

                                      Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                                      1 Reply Last reply
                                      0
                                      • H honey the codewitch

                                        I've seen SmallTalk - i think maybe in the late 80s early 90s? Been so long i don't even remember. Never tried it myself. I'm biased against languages that pretend to be something they're not. I know it's silly of me, but JS and Python with their ersatz OOP (that's not OOP) just leave me with a bad taste in my mouth. I dislike it I think for the same reasons I dislike Turkey-Bacon. Turkey is fine. Bacon is fine. Everything would be fine if they'd just stay in their lane. :~ Objects are fine. Associative arrays are fine. Associative arrays are not objects no matter how many functors you put into them.

                                        Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                                        M Offline
                                        M Offline
                                        megaadam
                                        wrote on last edited by
                                        #22

                                        I think you seem a bit impatient with Python. I find it useful for small quick things. For example string processing or web-scraping. And I do not give a toss whether they call it "object-oriented" or not. Lets call it stuff-oriented or whatevva. However, on the OO topic... We who are firmly rooted in C++ have a rather strict definition of OO. There are other ways of looking at the term. I warmly recommend this article on the history of OOP (or "OOP"!). The grandfather of the term, Alan Kay, has said among other things: “I made up the term ‘object-oriented’, and I can tell you I didn’t have C++ in mind.” “I’m sorry that I long ago coined the term “objects” for this topic because it gets many people to focus on the lesser idea. The big idea is messaging.” https://medium.com/javascript-scene/the-forgotten-history-of-oop[^]

                                        "If we don't change direction, we'll end up where we're going"

                                        H 1 Reply Last reply
                                        0
                                        • M megaadam

                                          I think you seem a bit impatient with Python. I find it useful for small quick things. For example string processing or web-scraping. And I do not give a toss whether they call it "object-oriented" or not. Lets call it stuff-oriented or whatevva. However, on the OO topic... We who are firmly rooted in C++ have a rather strict definition of OO. There are other ways of looking at the term. I warmly recommend this article on the history of OOP (or "OOP"!). The grandfather of the term, Alan Kay, has said among other things: “I made up the term ‘object-oriented’, and I can tell you I didn’t have C++ in mind.” “I’m sorry that I long ago coined the term “objects” for this topic because it gets many people to focus on the lesser idea. The big idea is messaging.” https://medium.com/javascript-scene/the-forgotten-history-of-oop[^]

                                          "If we don't change direction, we'll end up where we're going"

                                          H Offline
                                          H Offline
                                          honey the codewitch
                                          wrote on last edited by
                                          #23

                                          I'm happy with C#'s conception of objects, and even Java's What I don't like is ersatz objects that are effectively just hashtables keyed by the name of the member. That sort of construct doesn't fulfill all kinds of object oriented necessities like polymorphism - not that you can't MAKE that work in a language like that, it's just not pretty. It strikes me as Broken As Designed.

                                          Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                                          M 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups