From: Otto T. <zz...@ma...> - 2003-10-22 06:57:16
|
Hi Joerg, On Tue, 2003-10-21 at 14:06, Joerg Lehmann wrote: > Hi Otto, > > However, I don't like the name normdist too much. It doesn't seem > to be very intuitive, does it? How about one of the following. > > - absolute > - abslengths > - abslen > - relative > - rellengths > - rellen >=20 > Further suggestions? >=20 I admit that my choice wasn't the best. I think that the name should communicate that it is a length so that leaves *len and *lengths. When it comes to absolute vs. relative I think that relative is more suitable. So if I have a vote I would vote for rellengths or rellen (or even relativelen). I can prepare a new patch when you guys reaches a decision on the name issue. > > BTW: What version of python do you require? Is it ok to use True and > > False instead? >=20 > At the moment we only require Python 2.1, because it is the default in > Debian/stable, which does not know True and False. >=20 > > 2: However, for this to work the linewidth must be set before we set > > the dash so I introduced a class member in PathStyle named prio > > (default 0) and I set this prio to 1 in linewidth. Then in > > decoratedpath::_writestyles I do a reverse sort on prio before we > > write the styles to file. >=20 > Similar ordering problems arise at other places in PyX, where we > use a similar solution. Andr=E9, maybe we should use the mechanism > of the text module? >=20 I took a quick look and it seems that it only differs on some minor points. * texsettings uses id instead of prio * texsettings defines a __cmp__ in the base class instead of supplying =20 sort with a custom compare function Besides that it also defines a class member exclusive and only one object with the same id is allowed if the exclusive flag is set. I don't know if the last thing is applicable to pathstyles, but I can prepare a new patch with id instead of prio and that defines a __cmp__. What do you think? > > 3: I wasn't sure if it should be default behavior so I > > introduced dottedn, dashedn, and dashdottedn for now. >=20 > I really want to avoid the duplication of linestyles, so one > should really choose a sensible default. I would tend to > use the "automatic" behaviour. Other options? >=20 So do I, but the default values might need some tweaking. A general question: What is all those __implements__ about, I couldn't find anything that uses them in the source tree. So I thought that it was some feature in python, but I couldn't find anything in the documentation. /Otto |