On Fri, Mar 11, 2005 at 06:47:11PM -0500, Bob Ippolito wrote:
On Mar 11, 2005, at 2:26 PM, Skip Montanaro wrote:
Bob try:
Bob set
Bob except NameError:
Bob from sets import Set as set
Bob You don't need the rest.
Sure, but then pychecker bitches about
[Bob Ippolito]
try:
set
except NameError:
from sets import Set as set
You don't need the rest.
[Skip Montanaro]
Sure, but then pychecker bitches about a statement that appears to
have no effect. ;-)
[Bob Ippolito]
Well then fix PyChecker to look for this pattern :)
+1.
[Gregory P. Smith]
or make it even uglier to hide from pychecker by writing that as:
exec(
try:
set
except NameError:
from sets import Set as set
)
I presume that was somewhat tongue-in-cheek, but if it wasn't, please
reconsider. Modulefinder isn't able to realise
On Thu, 2005-03-10 at 23:46, Glyph Lefkowitz wrote:
That way instead of multi-line except NameError tests all over the
place you can simply have one-liner boilerplate for every module in your
project:
'from py24compat import *'
Easy to grep/sed for when you're ready to stop
Bob try:
Bob set
Bob except NameError:
Bob from sets import Set as set
Bob You don't need the rest.
Sure, but then pychecker bitches about a statement that appears to have no
effect. ;-)
Skip
___
Python-Dev mailing list
On Mar 11, 2005, at 2:26 PM, Skip Montanaro wrote:
Bob try:
Bob set
Bob except NameError:
Bob from sets import Set as set
Bob You don't need the rest.
Sure, but then pychecker bitches about a statement that appears to
have no
effect. ;-)
Well then fix PyChecker to
Anthony Goal 4: Try and prevent something like
Anthony try:
Anthony True, False
Anthony except NameError:
Anthony True, False = 1, 0
Anthony from ever ever happening again.
I will point out that in
On Mar 9, 2005, at 8:03 AM, Skip Montanaro wrote:
Anthony Goal 4: Try and prevent something like
Anthony try:
Anthony True, False
Anthony except NameError:
Anthony True, False = 1, 0
Anthony from ever
On Wed, 2005-03-09 at 07:17, Anthony Baxter wrote:
So it's only fair that I write down my rationale for why I'm being anal
about the no-new-features approach. Comments are more than welcome -
ideally, after discussion, I'll put some more words in the bugfix PEP.
I applaud your strictness
My google-fu returned, and I found the piece I was looking for earlier.
This discusses (from an internal Sun perspective) some of the problems
with Java. They make quite a big deal about the problem of changing
code across minor releases. I recall (re)reading this at some point and it
helped me
10 matches
Mail list logo