Re: private variables/methods
"Alex Martelli" <aleaxit@yahoo. com> wrote in message
news:Iseib.2048 01$hE5.6891483@ news1.tin.it...[color=blue]
> Terry Reedy wrote:[/color]
[color=blue][color=green][color=darkred]
> >> I think that __current_modul e__ is perhaps a bit too lengthy[/color]
> > and redundant ;-)[/color][/color]
I was slightly wrong since __name__ allows but does not constitute a
binding of the module itself.
[color=blue]
> I disagree. Lengthy it may be, but we do want a 'reserved module
> name' to use for this purpose.[/color]
I believe it would be easily possible to bind a module to
<module>.__self __ or <module>. __module__ at the same time
<module>__name_ _, .__file__, and .__doc__ are. ('Current' is no more
needed for __module__ than for the other vars.) If their were use
cases for self-access nearly as good as those for the others, and not
just the cuteness factor, I would support the addition. I would guess
that Guido and the other main developers either have not had such
needs or have not recognized such needs. Don't know if this addition
has been discussed before, and don't have time to search right now.
Terry J. Reedy
"Alex Martelli" <aleaxit@yahoo. com> wrote in message
news:Iseib.2048 01$hE5.6891483@ news1.tin.it...[color=blue]
> Terry Reedy wrote:[/color]
[color=blue][color=green][color=darkred]
> >> I think that __current_modul e__ is perhaps a bit too lengthy[/color]
> > and redundant ;-)[/color][/color]
I was slightly wrong since __name__ allows but does not constitute a
binding of the module itself.
[color=blue]
> I disagree. Lengthy it may be, but we do want a 'reserved module
> name' to use for this purpose.[/color]
I believe it would be easily possible to bind a module to
<module>.__self __ or <module>. __module__ at the same time
<module>__name_ _, .__file__, and .__doc__ are. ('Current' is no more
needed for __module__ than for the other vars.) If their were use
cases for self-access nearly as good as those for the others, and not
just the cuteness factor, I would support the addition. I would guess
that Guido and the other main developers either have not had such
needs or have not recognized such needs. Don't know if this addition
has been discussed before, and don't have time to search right now.
Terry J. Reedy
Comment