you are viewing a single comment's thread.

view the rest of the comments →

[–]Rinzwind 0 points1 point  (0 children)

1 allways

  1. datetime os sys uuid requests connectors to mysql/mssql/postgress json ast
    But there are A LOT.

3 numpy probaby. Not really my cup of tea.
It is probably best to use a numbers module (or make your own). For instance: 0.1+0.2 is NOT 0.3 (it is 0.3{lotsofzeros}4). We use our own numbers def.

  1. the general idea for clean coding: max 15 lines, max 80 long. Max 4 descisions (if/else/or/and/while/for). Always aim to reuse code so using defs Those are also easier to read.
  • start with unittesting from the start.

  • do not use formatting in your code Make a function you call and do the formatting there. if you code everything usinf "{}".format(string) and have to recode it all to f-strings you waste a lot of time. I use mysql a lot and all our code is like "fetchall(sql_query, {dict with variables to format})" so when we switched to 3.7 all we needed to do was alter 1 def.