Re: My Python annoyances

Paul Boddie wrote:
I'm sorry to hear about that. If by "macho" you mean people who insist
that things are good enough as they are, and that newcomers should
themselves adapt to whatever they may discover, instead of things
being improved so that they are more intuitive and reliable for
newcomers and experienced developers alike, then I'd certainly be
interested in undermining that culture.

That was the sort of response I got on freenode #python, which I realize I should not take as representative of the whole community. Thank you for the thoughtful response.

I tried to write portable Python code. The zlib CRC function returned
different results on architectures between 32 bit and 64 bit
architectures. I filed a bug report. It was closed, without a comment
from the person who closed it. I get the unspoken message: bug reports
are not welcome.

Can you provide the bug identifier? Bug reports are generally welcome,
and despite complaints about patch reviews, I've found people
reviewing things I've submitted.

It is problem report #1678102. I understand the problem: that a 32 bit number looks different in a 32 bit signed int than in a 64 bit signed int. However, the workaround of dropping a bit seems to defeat the purpose of using a CRC.

Yes, Ctrl-Z exits Python in the standard Windows edition. Since Cygwin
provides a POSIX-like environment, Ctrl-D should be used instead. If
the documentation is wrong, a bug report or patch should be filed
against the software.

This morning I could not reproduce the problem. When the user types "quit" at the Python prompt, the Cygwin port instructs the user to press Control-D, which works. Even if you SSH in to Cygwin, and run the win32 port, it instructs the user to press Control-Z plus Return, which works.
Maybe it was fixed after I had the problem.

Between 2.4 and 2.5, tempfile returns a different type of object. My
code cannot have a single test, it has check for type(obj) == file or
obj.__class__ == tempfile._TemporaryFileWrapper.

Try using isinstance or relying on "deeper" knowledge of how the
object will be used.

Thank you for the hint. I just want my function to validate that one of its arguments is a file-like object. It isn't necessarily going to be a temporary file, but it might be.

>>> import temporaryfile
>>> t = tempfile.TemporaryFile()
>>> isinstance(t, file)

My opinions, already expressed, include the observation that the core
development community is more interested in extending the language
than in strengthening the standard library (and its documentation). It
should be noted that the proposed standard library reorganisation,
which is a very conservative affair, has actually been postponed until
after the release of Python 3.0a1 according to a message I read
recently. And yet, if you read people's lists about what they "hate"
about Python (amongst actual users of Python), guess which thing
almost always comes up?

I guess you cannot blame folks for working on what they find interesting.


Relevant Pages

  • Re: My Python annoyances
    ... Bear in mind that #python has no special status with regards to python ... In the bug report itself, I saw a diagnosis of my problem's cause, and then I saw the bug report closed as invalid. ... Feedback in this newsgroup names my bug report as a "hobby horse", a "wart", and "not a real bug report". ... I am unqualified to comment on the Python philosophy, but I would like for my function to do some basic error checking on its arguments. ...
  • Re: problem with python in Debian/unstable
    ... Is this some problem with distribution and how do I ... Using Sid and can read a bug report, but still not quite sure what to do ... But it also seems that python and ... last entry in the bug report and tried dpkg --simulate -i, ...
  • Re: How Common Lisp sucks
    ... But with Python you don't have this problem. ... LOOP, for example, is built into Common Lisp but few ... i.e. because the user didn't bother to learn the language before ... because NEWCOMERS ARE ALWAYS CONFUSED UNTIL THEY LEARN WHAT THEY'RE ...
  • Re: Python Forum
    ... forum for Python enthusiasts over at (http:// ... Web-based forums is a preferred method by Python ... newcomers to get help in exploring the world of Python and programming ... NNTP is the living dead. ...
  • Re: How Common Lisp sucks
    ... But with Python you don't have this problem. ... LOOP, for example, is built into Common Lisp but few ... language does not sidestep the issue of having to evaluate different ... because NEWCOMERS ARE ALWAYS CONFUSED UNTIL THEY LEARN WHAT THEY'RE ...