On Wed, May 27, 2009 at 11:37 AM, davidp <dav...@reed.edu> wrote:
>
> Thanks.  I have switched to maximal_faces().
>
> I had a simplicial complex, s, and typed "s." + TAB to see the
> completions.  I saw s.facets, before seeing s.maximal_faces, then was
> confused by getting an error from s.facets().  It seems to be a
> convention with Sage to keep attributes hidden, so I thought you might
> want to know about this.

Yes, it is.  This convention has its pros and cons, and I'm not saying
it is the best.  However, it is used systematically throughout several
hundred thousand lines of code, so for no other reason than
consistency, I think we should stick with it.

> It is great to have simplicial complexes in Sage!

Indeed!

>
> Thanks,
> Dave
>
> On May 26, 4:25 pm, John H Palmieri <jhpalmier...@gmail.com> wrote:
>> On May 26, 3:19 pm, davidp <dav...@reed.edu> wrote:
>>
>>
>>
>> > Should there be a facets method?  Should self.facets be self._facets?
>>
>> > sage: version()
>> > 'Sage Version 4.0.rc0, Release Date: 2009-05-21'
>> > sage: s = SimplicialComplex(4, [[1,2], [1,4]])
>> > sage: s.facets()
>> > ---------------------------------------------------------------------------
>> > TypeError                                 Traceback (most recent call
>> > last)
>>
>> > /home/davidp/.sage/temp/poly/15731/
>> > _home_davidp_math_sandpile_sage_sage_sandpile1_4_sandpile_sage_250.py
>> > in <module>()
>>
>> > TypeError: 'list' object is not callable
>> > sage: s.facets
>> > [(1, 2), (1, 4)]
>>
>> > Dave
>>
>> I would point out that there is a maximal_faces() method, which just
>> returns the set of facets.  But if you want to change the 'facets'
>> attribute to '_facets' and then make 'facets' a synonym for
>> 'maximal_faces', that's fine with me.
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to