On Mon, Apr 11, 2016 at 8:29 PM, Nils Bruin <nbr...@sfu.ca> wrote:
> On Monday, April 11, 2016 at 10:46:59 AM UTC-7, Volker Braun wrote:
>>
>> On Monday, April 11, 2016 at 2:57:16 PM UTC+2, Erik Bray wrote:
>>>
>>> Sage, unfortunately, hasn't made many pacts in this regard
>>
>>
>> Sage does have a very clear way of making symbols available on the
>> commandline, namely via accompanying all.py files. We can either use that to
>> define our public api (which it de facto already is when you use Sage
>> interactively), or go through every module and sprinkle around underscores.
>> Only one of these two is realistic.
>
>
> Are you proposing to define the public API as just the functions that are
> available on the command line by default? It sounds attractive, but I think
> it's not workable. For instance, in
>
> sage: k.<a>=GF(5^3)
> sage: k.primitive_element()
> a
>
> I think we do have to consider `primitive_element` as part of the public API
> (otherwise, how do people get a primitive element in a finite field using
> only the public API?) So that would leave the sprinkling around underscores
> as the only realistic option ... Would you care to reconsider?

This is a perfect example of why class methods are especially critical
to have well-defined public/private visibility.  There's no
__all__-like mechanism for classes, unfortunately (the closest I can
think of is __dir__).

Thanks,
Erik

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to