Optional Function Parameters in Computer Language Docs (the idiocy thereof)
bisect.bisect_left(list, item[, lo[, hi]])
this is unreadable and confusing, especially because square brackets are valid syntax in the lang.
the tech geeking idiots write it that way because, writing it that way makes them computer scientists. It came from certain BNF. In particular, pythoners live in a world of “comp sci R us”.
what it means is this, any one of the following:
bisect.bisect_left(list, item) bisect.bisect_left(list, item , lo) bisect.bisect_left(list, item , lo, hi)
Here's another example, from PHP
array preg_grep ( string $pattern , array $input [, int $flags = 0 ] )
Addendum. In python doc for version 2.7 and 3.1 and later, they corrected this.
Now they write it like this:
bisect.bisect_left(a, x, lo=0, hi=len(a)).
(2013-02-25 Thanks to Yuri Khan.)
Python Documentation Sucks
- Python Doc Problem: os.system
- Python Doc Problem: os.path.split()
- Python Doc Problem: sort()
- Python Doc Problem: gzip
- Python Documentation Problems
- Python Documentation Author Masturbation
- How to Improve Python Doc; Notes on Rewriting Python Regex Doc
- Why Python's Documentation Sucks
- Python Poetry: the __main__ Stanza
- perldoc Coming of Age, What Python Can Learn From?
- Examples of Quality Documentation in Computing Industry
- Python Doc Links Dead
- Python Doc Links All Dead
- Python = Pretentious Sheet
- Optional Function Parameters in Computer Language Docs (the idiocy thereof)
If you have a question, put $5 at patreon and message me.