On Wednesday, 12 November 2014 21:27:50 UTC+11, Volker Braun wrote:
>
> The Sage code style is that methods are preferred over properties if in 
> doubt. And even in plain Python I would really recommend to only use 
> properties for static accessors. If you need to make a computation, use a 
> method. This makes it clear to the user that there is a computation 
> involved, even if it is just enumerating the possible representations for 
> future use. 
>
> It might be a minor inconvenience to have to write
>
> sage: A=MyFavouriteAlgebra()
> sage. A.representations()
> sage: _.<tab>
>
> but its much more annoying to have A.representations.<tab> hang for a long 
> time and then potentially raise an out of memory error etc. Also your UI 
> might automatically collect tab completions before you even press tab. 
>
 
The UI is essentially just a dictionary and it is constructed when A is 
first created. The objects that get included in it depend in a trivial way 
on the type and deformation parameters of the algebra A (i.e. arguments to 
__init__), so the run-time cost is negligible. My rationale for having this 
is the same as for the groups().<tab> expanders. If people don't like I'll 
remove it.

Andrew

-- 
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