Python training time (was)

Alex Martelli aleax at
Wed Feb 5 17:15:03 CET 2003

Andy Freeman wrote:

> "Brandon Van Every" <vanevery at> wrote in message
> news:<fZD_9.914$ek4.91595 at>...
>> So, how much time do you have to put into Python before you've mastered
>> *every* aspect of the language?  I do mean "every."  Less than a year?  6
>> months?  3 months?  Be honest.
> That's the wrong question.

It's an IRRELEVANT question, but that doesn't make it "wrong", any
more than asking what size shoes you wear -- that's a perfectly
"right" question, just has nothing to do with the discussion, but,
so what?

In my case, the answer (for a single version of Python) was about
one year (not full-time, of course -- I was doing lots of other
things in my job &c that year).  For C++ (again a single version),
it was more or less "forever" -- about five years, close to full
time, didn't bring me to "*every* aspect ... I do mean *every*",
only to, say, 99.44% or so, judging on the basis of how often
problems would arise that revealed to me yet another aspect
(most often due to subtle bugs that colleagues brought me for
help on, as I acted as the internal consultant on C++ for all
of my colleagues as well as doing some development myself).  IF
a single version had ever been in stable use for over 5 years,
then it's possible (but not certain) that I might have reached
the "*every*" (100%) stage, but I cannot know for sure.

Oh, and, I wear about a size 45 shoe, depending on the shoe's
exact design (that's in _Italian_ shoe-measurement standards --
I think it's a bit more than 11 in US standards, etc).

<aside mode="rambling">

BTW, there are a couple of heuristics you can use to estimate
how well your observations so far have covered a "population"
whose diversity is likely to be far vaster than your sample --
basically, guess the probability that your NEXT observation
will not be one you had ever made before.  The popular and
relatively optimistic heuristic for this is due to Turing:
N1/N, where N is the total number of observations you have
made and N1 is the number of "things" you have observed just
ONCE.  (The almost-unknown and definitely pessimistic one
is due to me: ND/N, where ND is the number of different
"things" you have observed -- it worked better than Turing's,
in practical terms, in various tasks connected to computational
linguistics for probabilistic modeling of natural language --
but mine is pessimistic indeed, as it NEVER predicts 0 as
the probability of a "new" observation... I have all kinds
of "philosophical" support for my heuristic, but that's
another thread).

By Turing's heuristic I could estimate the probability that
the NEXT bug somebody asks me for advice about comes from
a language feature I didn't know [a] in Python and [b] in
C++.  If you assume the language has finite "size" in terms
of number of features, then from that estimated probability
you can tell what fraction of the language you know *when
you weight each feature by the probability it has of being
the cause of a bug that's too hard for the querant to solve
by him/herself* (indeed the finite-size hypothesis is not
necessary -- the language could have infinite features, as
long as the frequencies with which they pop up tend to zero
fast enough as you move towards more and more obscure
features... hmmm, I think I'm characterizing C++ quite
well here...).  However, if you suppose for example that a
language has some "easter egg" -- an undocumented feature
that only pops up in a combination of circumstances that
is [A] extremely unlikely to occur by chance *AND* [b]
also very unlikely to cause a perceived bug (so you might
never get a report about that), then this might break down
(and my own pessimistic heuristic would win again;-).

Basically, by Turing's estimate, you could say you know
all of the language (there's a probability of zero that
the next feature you observe will be new to you) when you
have observed all possible features at least TWICE each.

Of course, all of this assumes a random process as the
"selector" of features you observe.  If you cheat and
actually READ (and understand) all of the reference manual
and sources for the reference implementation, then the
heuristics may not be applicable.  That's quite easy for
Python (takes much less than a year, if you can devote
a solid chunk of full-time to it), not for C++ these days
(no reference implementation -- and the standard, not
being fully implemented in any given compiler you may
want to use, these days, is not entirely helpful, though
as years keep passing things may eventually get better).



More information about the Python-list mailing list