[sage-support] Re: Adding new attribute to Poset

2020-09-28 Thread pong
Thanks Eric. It works! I figured out the FinitePoset part after reading the manual. But I know test that it works for X = FinitePoset(...) I didn't think of trying it with X = Poset(...). On Monday, September 28, 2020 at 11:38:15 AM UTC-7 egourg...@gmail.com wrote: > Poset is a function, whic

[sage-support] Re: Adding new attribute to Poset

2020-09-28 Thread Eric Gourgoulhon
Poset is a function, which constructs a finite poset, not the poset class, as you can check: sage: type(Poset) You can also check it by having a look at the source code: sage: Poset?? So when you write Poset.upper_bounds = upper_bounds you are attaching upper_bounds to the function, not to the c