14

Correct me if I'm wrong, Python is absolutely built on:
--Data encapsulation
--Dependency Hell
-- ambiguous object types
-- You BETTER hope that package has a function to turn that object into another HOPEFULLY SUPPORTED object (basically even more encapsulation)
--Oops this package doesn't support this other package, so you need to do another 20 lines of conversion
I really don't understand what makes Python so likable?? Am I just being stupid, or does exceptions like "This does not support multiclass" the worst fucking exception i've ever seen? Or "Shape (None,1) not compatible with (None,7)"? I get it that you can fix it if you've seen this issues multiple 100s of times, but for the first time, how the fuck am I supposed to debug this?

Comments
  • 10
    You forgot "WTF, Python's JSON library can't work with any types/classes outside the standard lib by default? Are they fucking insane?"

    Yeah, I don't get it either. Python is really cool for small scripts, prototypes and I guess some data science stuff with optimized libraries and Jupyter. But once you try to actually build something serious it gets cumbersome really quick.
  • 0
    @deadlyRants THIS. I totally agree. I don't know why it isn't part of the idea that the data can be exported in a logical manner
  • 2
    Python is good for anything but OOP. Change my mind.
  • 0
    @iiii I kind of agree there
    Detail oriented paradigm and it does seem ok
    For short things
    I’m playing with it now and have written a small project in it
    And am surprised that minus custom installations vs code is actually a pretty good editor for it
    Better than pycharm unless you want venv

    But yeah python seems ok
    Annoying that it’s GUI is tk
  • 1
    I found myself telling my team today, "no thanks, I'm allergic to python"
  • 1
    Well.... Pythons OOP support is quite limited.

    But you don't need OOP to build good stuff.

    :) (I hope I'm not getting stoned again....)

    Drop the "It must be OOP by book" attitude and Python is quite nice.

    If you try to do OOP with Python it becomes Danger Noodle....
  • 0
    @IntrusionCM I'm not trying to do OOP tho.. It's the design of the classes that already exist in Python's famous packages, where you instantiate an object, but most of the data of the object is encapsulated and not easily accessible or obtained in a unified format.
  • 2
    I don't remember having this much trouble with python. I have written several applications for customers that were easy to maintain and support.

    Do you have an example git repo we can look at?

    I am especially confused about converting data from one object to another. Unless the module is a C based module you can see a lot of the internals using introspection.

    If you need an object to be similar to another object just duck type it.
  • 2
    @VerenOnline what @Demolishun said.

    And your statement sounds exactly like one of the fundamentals of OOP - polymorphism and interfaces...

    I'm overworked and brain is in state of deep fried, but so far it sounds like you expect OOP and polymorphism / interfaces.
  • 0
    Question: Are you writing Pythonic code or are you writing code the way you did in another language? If you don't know what Pythonic is I recommend watching some videos on how to write code for Python on youtube.

    There are others, but this video helped me a lot:

    https://youtube.com/watch/...
  • 2
    In Python, not only functions, but classes too are first class citizen. You can have a function taking a class and returning another class based on the given class. That also makes reflection a part of the core language.
    And the Iterator/Generator support is insane for a dynamically typed language.
    From a language-design point of view, it is really young and rich on features you don't see in older multi-paradigm languages.

    But it of course is mostly loved for its ease of use as a glue language and most just write procedural code in it.
    It also helps, that it has the most-consistent and best-curated standard library on the planet.

    But: Don't ever wish for automatic support for deserialization of classes and functions in a data exchange library as that is, where the deserialization exploits come from.
  • 1
    Python can't be used for frontend web dev...
    Python is slow for backend server...
    Python is slow for stats and machine learning. We have Julia, C#, and other faster languages...
    Python is not well suited for app development, whether be on desktop or mobile...
    So why are they using Python? Because their high school or college teachers taught them Python and so it became their go to language ever since.
  • 0
    @jasongodev

    *here's a sand paper to wipe your tears*
Add Comment