On 15 June 2017 at 11:06, Nathaniel Smith wrote:
> On Wed, Jun 14, 2017 at 1:54 PM, Barry Scott wrote:
>> > On 13 Jun 2017, at 23:49, Chris Angelico wrote:
>> > For that purpose, is it possible to use super().__dir__()? Are there
>> > any considerations where that would fail?
>>
>> Remember that
On Wed, Jun 14, 2017 at 1:54 PM, Barry Scott wrote:
> > On 13 Jun 2017, at 23:49, Chris Angelico wrote:
> > For that purpose, is it possible to use super().__dir__()? Are there
> > any considerations where that would fail?
>
> Remember that I need to do this in the C API and I want default_dir of
On 06/14/2017 01:54 PM, Barry Scott wrote:
super().__dir__ looks at the class above me that is typically object() and so
is not useful
as it does not list the member function from my class or __mro__ or other stuff
I may not be aware of
that is important to return.
__dir__ should return what
On Thu, Jun 15, 2017 at 6:54 AM, Barry Scott wrote:
>> class Magic:
>>def __getattr__(self, attr):
>>if attr in self.generatables:
>>return self.generated_value(attr)
>>raise AttributeError
>>def __dir__(self):
>>return default_dir(self) + self.generatab
> On 13 Jun 2017, at 23:49, Chris Angelico wrote:
>
> On Wed, Jun 14, 2017 at 8:09 AM, Terry Reedy wrote:
>> Perhaps you are looking for __dir__, called by dir().
>>
>> " dir([object])
>>
>>Without arguments, return the list of names in the current local scope.
>> With an argument, attemp
Huh? The semantics of node.js seem to be completely similar to Python in
this respect.
In both cases the circular import works if you go through the mutable
module object but fails if both modules circularly try to import module
members directly.
Stephan
Op 14 jun. 2017 11:17 a.m. schreef "Abdur
anyways circular imports seem to be making people go for node.js rather
than using python . . .
Abdur-Rahmaan Janhangeer,
Mauritius
abdurrahmaanjanhangeer.wordpress.com
On 13 Jun 2017 23:04, "Barry Scott" wrote:
> Recently I fell into the trap of creating a circular import and yet again
> it to
On 14 June 2017 at 09:59, Paul Moore wrote:
> On 13 June 2017 at 23:36, Chris Angelico wrote:
> > On Wed, Jun 14, 2017 at 8:10 AM, Mahmoud Hashemi
> wrote:
> >> I didn't interpret the initial email as wanting an error on *all*
> circular
> >> imports. Merely those which are unresolvable. I've d
On 13 June 2017 at 23:36, Chris Angelico wrote:
> On Wed, Jun 14, 2017 at 8:10 AM, Mahmoud Hashemi wrote:
>> I didn't interpret the initial email as wanting an error on *all* circular
>> imports. Merely those which are unresolvable. I've definitely helped people
>> diagnose circular imports and w