If no repository argument is supplied in the command-line (remember, the argument is actually a section name in .pypirc, or the url itself), then it looks for the default http://pypi.python.org/pypi.
Then, this default is matched against any section in your .pypirc file.
If this default matches a section's name, or its repository value, then it is returned.
If nothing is matched, then the upload command gets no username and password.
If you're following the documentation, you're bound to fail because you wrote down the repository as http://www.python.org/pypi, which will result in a mismatch.
Change the logic so that if the URL in the current section matches http://www.python.org/pypi and you didn't supply a repository argument in the command-line, it will return the information from this section, instead of skipping it.
Option #1 is more 'correct', but #2 is safer and more compatible -- as people may have used pypi.python.org