On 2020-09-25 7:46 AM, Chris Angelico wrote:
On Fri, Sep 25, 2020 at 3:43 PM Frank Millman wrote:
Hi all
I have a problem related (I think) to list comprehension namespaces. I
don't understand it enough to figure out a solution.
In the debugger, I want to examine the contents of the current
On Fri, Sep 25, 2020 at 3:43 PM Frank Millman wrote:
>
> Hi all
>
> I have a problem related (I think) to list comprehension namespaces. I
> don't understand it enough to figure out a solution.
>
> In the debugger, I want to examine the contents of the current instance,
> so I can type
>
>
Hi all
I have a problem related (I think) to list comprehension namespaces. I
don't understand it enough to figure out a solution.
In the debugger, I want to examine the contents of the current instance,
so I can type
(Pdb) dir(self)
and get the result with no problem.
However, it is
The problem: if you're currently in a nested class, you can't look up
variables in the outer class scope.
For example, this code fails in Python 3:
class Outer:
class Inner:
class Worker:
pass
class InnerSubclass(Inner):
class Worker(Inner.Worker):
On Wed, Apr 13, 2011 at 7:12 PM, Larry Hastings la...@hastings.org wrote:
Yes, I could make the problem go away if I didn't have nested inner classes
like this. But I like this structure. Any idea how I can make it work
while preserving the nesting and inheritance?
It's probably better to
Larry Hastings wrote:
The problem: if you're currently in a nested class, you can't look up
variables in the outer class scope.
For example, this code fails in Python 3:
class Outer:
class Inner:
class Worker:
pass
class InnerSubclass(Inner):
class
On Wed, Apr 13, 2011 at 3:12 AM, Larry Hastings la...@hastings.org wrote:
The problem: if you're currently in a nested class, you can't look up
variables in the outer class scope.
For example, this code fails in Python 3:
class Outer:
class Inner:
class Worker:
pass
On 04/13/2011 07:37 PM, Eric Snow wrote:
I suppose you could try something like this:
class Outer:
global Inner
class Inner:
class Worker:
pass
class InnerSubclass(Inner):
class Worker(Inner.Worker):
pass
However, that pollutes your global namespace. If you are
On Jul 1, 3:30 pm, Rhodri James rho...@wildebst.demon.co.uk wrote:
If this is a version of your code that actually fails when you run it
(rather than being another artistic interpretation of a photograph of your
code :-), then I'd go with Matt's analysis. This will give you a
I have a script that generates a report from a bunch of data I've been
collecting for the past year. I ran the script, successfully, for
several weeks on test runs and creating more detailed reports.
Today (back from vacation) and the script doesn't work. It's giving me
a name error.
I'm running
Josh English joshua.r.english at gmail.com writes:
I have a script that generates a report from a bunch of data I've been
collecting for the past year. I ran the script, successfully, for
several weeks on test runs and creating more detailed reports.
Today (back from vacation) and the
On Jul 1, 2:50 pm, Matt McCredie mccre...@gmail.com wrote:
That doesn't give me enough information to help you with the issue. In general
you need to provide enough code to reproduce the failure, not some modified
version that doesn't fail. My guess is that the if True is actually
something
On 01/07/2010 22:30, Josh English wrote:
I have a script that generates a report from a bunch of data I've been
collecting for the past year. I ran the script, successfully, for
several weeks on test runs and creating more detailed reports.
Today (back from vacation) and the script doesn't
On Thu, 01 Jul 2010 23:07:53 +0100, Josh English
joshua.r.engl...@gmail.com wrote:
On Jul 1, 2:50 pm, Matt McCredie mccre...@gmail.com wrote:
My guess is that the if True is actually something
else, and it isn't being interpreted as True. As such, fws_last_col
never
gets assigned, and
On Thu, 01 Jul 2010 23:30:33 +0100, Rhodri James wrote:
On Thu, 01 Jul 2010 23:07:53 +0100, Josh English
joshua.r.engl...@gmail.com wrote:
On Jul 1, 2:50 pm, Matt McCredie mccre...@gmail.com wrote:
My guess is that the if True is actually something
else, and it isn't being interpreted as
15 matches
Mail list logo