ch intern has it's own reference to its exception. I
never really thought about it when they were just peer objects
traveling up the stack.
Just an idea from a different seat ;)
-Shane Holloway
___
Python-Dev mailing list
Python-Dev@python.
I will certainly look forward to using it.
On May 25, 2006, at 16:21, Fredrik Lundh wrote:
> does anyone remember? given what we're currently working on,
> implementing it would take roughly no time at all. do people still
> think it's a good idea ?
>
>
>
> __
On Feb 15, 2006, at 20:06, Greg Ewing wrote:
> Barry Warsaw wrote:
>
>> If we go with two functions, I'd much rather hang them off of the
>> file
>> type object then add two new builtins. I really do think
>> file.bytes()
>> and file.text() (a.k.a. open.bytes() and open.text()) is better tha
haps
nbase? And maybe fbase for the floating point one...
Thanks,
-Shane Holloway
#!/usr/bin/env python
#
#~ Imports
#
import math
#~
Raymond Hettinger wrote:
> I would think that that generic clearing is a lark. First, it only
> applies to mutable objects. Second, it would likely only be useful in
> the presence of a generic method for adding to the cleared container (as
> opposed to the existing append(), add(), and setitem()
+1 PEP 340 redux (although I marginally prefer the "with" keyword)
Guido van Rossum wrote:
> So then the all-important question I want to pose is: do we like the
> idea of using a (degenerate, decorated) generator as a "template" for
> the do-statement enough to accept the slightly increased compl
EXPR1" instead of "itr = iter(EXPR1)"? It
seems to be a dis-symmetry with the 'for' loop specification.
Thanks,
-Shane (Holloway) ;)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/pyt
And per the PEP, I think the explaining that::
try:
A
except:
B
else:
C
finally:
D
is *exactly* equivalent to::
try:
try:
A
except:
B
else:
C
finally:
D
R
:" punctuation and subsequent
indentation of the block for skimming code.
-Shane Holloway
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Aahz wrote:
On Mon, Apr 25, 2005, Shane Holloway (IEEE) wrote:
Interfaces::
def interface(interfaceName, *bases, ***aBlockSuite):
blockGlobals = aBlockSuite.globals().copy()
blockGlobals.update(aBlockSuite.locals())
blockLocals = {}
exec aBlock in blockGlobals
cals and have them magically appear in the namespace. ;)
Personally, I'm rather attached to "as (x, y):" introducing the block.
To conclude, I mocked up some potential examples for your entertainment. ;)
Thanks for your time and consideration!
-Shane Holloway
Interfaces::
d
Aahz wrote:
On Tue, Apr 19, 2005, Shane Holloway (IEEE) wrote:
However, my opinion is that it does not read smoothly. This form
requires that I say what I'm doing with something before I know the
context of what that something is. For me, blocks are not about
shortening the code, but r
c = self.readPartC(aFile)
return (a, b, c)
and::
def readAndReturn(self, filename):
withFile(filename):
a = self.readPartA(aFile)
b = self.readPartB(aFile)
c = self.readPartC(aFile)
return (a, b, c)
Try it with yield to further vex
FWIW, this should work:
def replaceFrame(self, ref, oldValue, newValue):
for name, value in ref.f_locals.items():
if value is oldValue:
exec "ref.f_locals[name] = newValue"
assert ref.f_locals[name] is newValue
And, no, you don't have to tell
Brett C. wrote:
Other option would be to add a function that either directly modified
single values in f_localsplus, a function that takes a dict and
propogates the values, or a function that just calls
PyFrame_LocalsToFast() .
Brett!! Thanks for looking this up! With a little help from ctypes
ected on the invocation of the
function. This is a subtle issue with reloading code, and can be
documented. And at best there is an effective way to replace it, the
system can be changed to a consistent state even in the stack, and I can
rejoice. Even if I have to wait until 2.5. ;
Alex Martelli wrote:
def f(*a): pass class C(object): pass class D(object): pass C.f = D.f
= f
If now we want C.f.im_class to differ from D.f.im_class then we need
f to get copied implicitly when it's assigned to C.f (or, of course,
when C.f is accessed... but THAT might be substantial overhead).
the
ability to remove a file in the archive, as well as "write over" a file
already in the archive.
It's a tall order, but you asked. ;)
Thanks,
-Shane Holloway
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.o
18 matches
Mail list logo