def
keyword is named inconsistently
since "def" does in no way says that a
function is being defined
__init__
just looks like this
is an internal function not meant to be used
in any way.
operator
keyword for operator
functions
#
instead of the
more conventional //
raise
and
except
instead of the usual
throw
and catch
elif
instead of easier to
remember else if
.
elif
really just seems like a
useless keyword
not
, and
and
or
instead of the cleaner looking and
easier to write !
,
&&
and ||
switch
statement or
something similar, leading to huge
elif
blocks
pass
keyword and for some reason, it is
not possible to just leave out the :
:=
) instead of just making the
normal assignment an expression
foo
but then
accidentally mistype it as fo
. if this
happens, it will be hard to debug the value if
foo
was used before, because
foo
may have an unexpected value later
in the program
self
parameter is passed into the
function which is unnecessary boilerplate. this
should happen seamlessly because python has no
advantage in specifying it. instead an approach like
java should be taken that some keyword should be
added to make the function static. however, a self
parameter is not always a bad idea, but it is in
python. in languages like rust, it makes sense
because self could be a pointer, or mutable which
needs to be stated however in python
self
only ever has one variation making
the parameter unnecessarily complicated
help(element)
. this
is really strange. docs should not be able to affect
the program in any way. this allows to use them as
data, which should not be possible
exit
you get
Use exit() or Ctrl-Z plus Return to exit
however, there is still often a better alternative