Spotted on c.l.python. Although Pythonwin is mentioned, python.exe
gives the same results - as does 1.5.2.
Seems a reasonable question...
[Also, if Robin hasn't been invited to join us here, I think it could
make some sense...]
Mark.
-------- Original Message --------
Subject: try...else
Date: Fri, 22 Dec 2000 18:02:27 +0000
From: Robin Becker <robin(a)jessikat.fsnet.co.uk>
Newsgroups: comp.lang.python
I had expected that in try: except: else
the else clause always got executed, but it seems not for return
PythonWin 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit (Intel)] on
win32.Portions Copyright 1994-2000 Mark Hammond (MarkH(a)ActiveState.com)
- see 'Help/About PythonWin' for further copyright information.
>>> def bang():
.... try:
.... return 'return value'
.... except:
.... print 'bang failed'
.... else:
.... print 'bang succeeded'
....
>>> bang()
'return value'
>>>
is this a 'feature' or bug. The 2.0 docs seem not to mention
return/continue except for try finally.
--
Robin Becker
I've seen a thread on this but there was no conclusive answer, so I'm
reopening this.
I can't SCP updated PEPs to the SourceForge machine. The "pep2html.py
-i" command just hangs. I can ssh into shell.sourceforge.net just
fine, but scp just hangs. "scp -v" prints a bunch of things
suggesting that it can authenticate itself just fine, ending with
these three lines:
cj20424-a.reston1.va.home.com: RSA authentication accepted by server.
cj20424-a.reston1.va.home.com: Sending command: scp -v -t .
cj20424-a.reston1.va.home.com: Entering interactive session.
and then nothing. It just sits there.
Would somebody please figure out a way to update the PEPs? It's kind
of pathetic to see the website not have the latest versions...
--Guido van Rossum (home page: http://www.python.org/~guido/)
Want to help with the laudable goal of automating the Python build
process? It'll need lots of testing on many different platforms, and
I'd like to start the process now.
First, download the setup.py script from
http://www.amk.ca/files/python/setup.py
Next, drop it in the root directory of your Python source tree and run
"python setup.py build".
If it dies with an exception, let me know. (Replies to this list are
OK.)
If it runs to completion, look in the Modules/build/lib.<something>
directory to see which modules got built. (On my system, <something>
is "linux-i686-2.0", but of course this will depend on your platform.)
Is anything missing that should have been built? (_tkinter.so is the
prime candidate; the autodetection code is far too simple at the
moment and assumes one particular version of Tcl and Tk.) Did an
attempt at building a module fail? These indicate problems
autodetecting something, so if you can figure out how to find the
required library or include file, let me know what to do.
--amk
OK, I think I'm ready to declare the Python bookstore complete enough
to go public. Before I set up redirects from www.python.org, please
take another look. (More book descriptions would be helpful...)
http://www.amk.ca/bookstore/
--amk
I have 2.0 up and running on RH7.0, compiled from sources. In the process,
I discovered a couple of issues:
1. The curses module is commented out in the default Modules/Setup
file. This is not good, as it may lead careless distribution builders
to ship Python 2.0s that will not be able to support the curses front
end in CML2. Supporting CML2 (and thus getting Python the "design
win" of being involved in the Linux kernel build) was the major point
of integrating the curses module into the Python core. It is possible
that one little "#" may have blown that.
2.The default Modules/Setup file assumes that various Tkinter-related libraries
are in /usr/local. But /usr would be a more appropriate choice under most
circumstances. Most Linux users now install their Tcl/Tk stuff from RPMs
or .deb packages that place the binaries and libraries under /usr. Under
most other Unixes (e.g. Solaris) they were there to begin with.
3. The configure machinery could be made to deduce more about the contents
of Modules/Setup than it does now. In particular, it's silly that the person
building Python has to fill in the locations of X librasries when
configure is in principle perfectly capable of finding them.
--
<a href="http://www.tuxedo.org/~esr/">Eric S. Raymond</a>
Our society won't be truly free until "None of the Above" is always an option.
[Barry Warsaw]
> Modified Files:
> python-mode.el
> Log Message:
> (python-font-lock-keywords): Add highlighting of `as' as a keyword,
> but only in "import foo as bar" statements (including optional
> preceding `from' clause).
Oh, that's right, try to make IDLE look bad, will you? I've got half a mind
to take up the challenge. Unfortunately, I only have half a mind in total,
so you may get away with this backstabbing for a while <wink>.
On Fri, Dec 22, 2000 at 07:07:03AM -0800, noreply(a)sourceforge.net wrote:
> * Guido-style: 8-column hard-tab indents.
> * New style: 4-column space-only indents.
Hm, I must have missed this... Is 'new style' the preferred style, as its
name suggests, or is Guido mounting a rebellion to adhere to the One True
Style (or rather his own version of it, which just has the * in pointer
type declarations wrong ? :)
--
Thomas Wouters <thomas(a)xs4all.net>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
Is it just me, or is anybody else getting this error when trying to
access the bug list?
> An error occured in the logger. ERROR: pg_atoi: error in "5470/":
> can't parse "/"
I just upgraded to Red Hat 7.0 and installed Python 2.0. Anybody have
a recipe for making Tkinter support work in this environment?
--
<a href="http://www.tuxedo.org/~esr/">Eric S. Raymond</a>
"Government is not reason, it is not eloquence, it is force; like fire, a
troublesome servant and a fearful master. Never for a moment should it be left
to irresponsible action."
-- George Washington, in a speech of January 7, 1790