On Tue, May 5, 2015 at 2:10 PM, Eric Gourgoulhon <egourgoul...@gmail.com> wrote:
> Hi,
>
> Le mardi 5 mai 2015 12:44:08 UTC+2, vdelecroix a écrit :
>>
>>
>> IMHO, they do not belong either to parents. A set has generators?
>>
>> sage: Partitions(5).gens_dict()
>> Traceback (most recent call last):
>> ...
>> AttributeError: 'StandardPermutations_n_with_category' object
>> has no attribute 'gens'AttributeError: 'Partitions_n_with_category'
>>
>
> In the same vein, shouldn't base_ring be removed from Parent as well ?
>
> sage: Set([1,2,3]).base_ring()
>
> The return value is None, which is arguably correct, for a generic set has
> no base ring, but it might be surprising when using tab completion to
> discover functionalities to see that a base_ring() method exists for such
> objects.

As Parents have Elements, this is also the root of operations that
deal with coercion (arithmetic between elements of unequal Parents).
Some functions like base_ring are used for coercion, though arguments
could be made that it could be moved elsewhere and called dynamically
iff it exists.

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to