18
eeee
8y

2018 dev goal #1: ✔️

This week I learned Python 3, as in most of the syntax. Not yet any development, but that will come tomorrow onwards.

Oh, and I hate the funky type system, which is almost non existent and so flexible that I don't know if it's just bad or I simply don't see why I should want it this way.

Please enlighten me why you think Python is great or just plain snake crap.

Did I mention snake case being common practice? And that Python doesn't know real private properties, methods, etc.? How does that work?

Comments
  • 3
    The funky type structure is actually called dynamic type, which is useful in scripting language, ans Python offers a way to regulate types

    @AndSoWeCode I actually like snake_case, even if I prefer 🤬_F🤬CKING_SCREAMING_SNAKE_CASE
  • 0
    @-vim- ++ for screaming snake case
  • 1
    @AndSoWeCode i wanna hear more about your problems with the docs. I actually find them quite nice and the built in docs help from when doing stuff on the repl. I seldom find docs that I don't like tho so I am clearly biased (plus I love python)
  • 2
    Snake case and passing self as an argument are two of my biggest complaints with it
  • 1
    @AndSoWeCode You forgot dependency hell.
  • 0
    Python hast a typing system in function heads so you can specify what exactly (even a dictionary of lists of sets can be specified) you're working with.

    Apart from that, yeah, if you're not careful you'll end up with spaghetti really quickly.
  • 0
    @irene yes, It is unfortunate/annoying but at least it supports it, making dynamic typing less annoying. You could also have a function that checks the type and throws an error if it's not equal, but that's just another hack
  • 0
    Yes, but not just for the standard types (list, dict, Str etc.) but also for types which are generated by modules. For example opening a xlsx with openpyxl and grabbing a range of cells would become a List[List[tuple(openpyxl.cell, str)]]

    God that would be soooooo nice!
  • 2
    @irene @polaroidkidd The philosophy behind not enforcing type is the same as not having private functions: “We’re all adults here”
  • 1
    @-vim- yeah I get that. What really bothers me about it is the missing auto-complete functions when pycharm isn't sure which type it is.
  • 0
    @irene @-vim- if after assigning to a variable you do something like this, it autocpletes like a charm (pun intended)
    myvar = whatever() # type: str

    Of course, you can change str for any type, and there are special ones for tuples, lists, dicts, etc.

    It is very useful when using types you don't know what they have inside
  • 0
    @irene it helps the IDE autocomplete, though, which is enough for me.
Add Comment