Re: What are modules really for?
"Mike Meyer" <mwm@mired.or g> wrote in message
news:86r7cy63wi .fsf@bhuda.mire d.org...[color=blue]
> Magnus Lycka <lycka@carmen.s e> writes:[/color]
[color=blue][color=green]
>> Terry Reedy wrote:[color=darkred]
>>> However, everything is an instance of a class or type.[/color][/color][/color]
[color=blue][color=green]
>> Except whitespace, comments, operators and statements!
>> (Did I miss anything?)[/color][/color]
[color=blue]
> [snip] Maybe the properly
> refined version of Terry's statement should be:
>
> Everything you can manipulate is an instance of a class or a
> type.[/color]
Yes and no.
First, the context of the statement was a previous claim that some things
are class instances and some not. So my point in that context was a) that
adding 'or type' changes 'some' to 'every' and that new classes mostly
eliminate the difference between class and type, making the addition
eminently sensible. So while I thought of a qualifier like that, I left it
out as irrelevant and a distractions.
Second, any qualifier I can think of seems to have the danger of confusing
as well as enlightening. One might not realize, for instance, that
functions are something you can manipulate and might therefore mistakenly
think that the qualifier excludes functions. I also thought of putting it
as 'everything in Python's dataspace ...', but that has the same problem.
Perhaps 'every runtime entity...'. would work. That seems to excludes
source code (and things within source code like comments and whitespace and
operator symbols), unless the code or pieces thereof *are* turned into (or
wrapped as) string instances. Names might seem like an exception, but
again, they are only accessible at runtime as string instances. Or maybe a
more direct statement 'except for source code, everything...' would be
better.
So I have so far not settled on a 'best' context-free statement of the
design principle.
Terry J. Reedy
"Mike Meyer" <mwm@mired.or g> wrote in message
news:86r7cy63wi .fsf@bhuda.mire d.org...[color=blue]
> Magnus Lycka <lycka@carmen.s e> writes:[/color]
[color=blue][color=green]
>> Terry Reedy wrote:[color=darkred]
>>> However, everything is an instance of a class or type.[/color][/color][/color]
[color=blue][color=green]
>> Except whitespace, comments, operators and statements!
>> (Did I miss anything?)[/color][/color]
[color=blue]
> [snip] Maybe the properly
> refined version of Terry's statement should be:
>
> Everything you can manipulate is an instance of a class or a
> type.[/color]
Yes and no.
First, the context of the statement was a previous claim that some things
are class instances and some not. So my point in that context was a) that
adding 'or type' changes 'some' to 'every' and that new classes mostly
eliminate the difference between class and type, making the addition
eminently sensible. So while I thought of a qualifier like that, I left it
out as irrelevant and a distractions.
Second, any qualifier I can think of seems to have the danger of confusing
as well as enlightening. One might not realize, for instance, that
functions are something you can manipulate and might therefore mistakenly
think that the qualifier excludes functions. I also thought of putting it
as 'everything in Python's dataspace ...', but that has the same problem.
Perhaps 'every runtime entity...'. would work. That seems to excludes
source code (and things within source code like comments and whitespace and
operator symbols), unless the code or pieces thereof *are* turned into (or
wrapped as) string instances. Names might seem like an exception, but
again, they are only accessible at runtime as string instances. Or maybe a
more direct statement 'except for source code, everything...' would be
better.
So I have so far not settled on a 'best' context-free statement of the
design principle.
Terry J. Reedy
Comment