> > Would this be good interface: > > Posets_iterator(n, properties=None, width=None, height=None) >
Do you have a specific reason for creating a class Posets_iterator? Or would a simple function do the job? Whatever you chose, it should probably be made available as an element of posets.<tab>. For graphs, you can do "list(graphs(6))", but you may want to not copy this kind of behaviour. It's up to you. You could also have posets.posets_iterator() or posets.posets_all() or posets.posets(), whichever you prefer (or others I did not think of). Then, you have the problem of the "Posets" object, exported in the global namespace. Right now, this thing is the "category of Posets". So if you want something like the following to work, you will have to mess with this category (or replace it by another object) sage: for p in Posets(max_width=3,max_height=4,num_points=90): ....: <do_something> Of course, its __iter__ method would be your iterator. Nathann -- 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.