## [PyX-devel] tangent in path.py and normpath.py

 [PyX-devel] tangent in path.py and normpath.py From: Andreas Matthias - 2008-05-14 14:50:06 ```p1 = path.line(0,0,5,5) t1 = p1.tangent(p1.begin()) p2 = p1.reversed() t2 = p2.tangent(p2.begin()) Oops! Calculating tangent t1 works fine but it fails for tangent t2, because p1 is a path, whose tangent method has a default value for the length argument def tangent(self, params, length=1): whereas p2 is a normpath, whose tangent method does not have a default value for the length argument def tangent(self, params, length): This seems to be inconsistent, doesn't it. Ciao Andreas ```

### Thread view

 [PyX-devel] tangent in path.py and normpath.py From: Andreas Matthias - 2008-05-14 14:50:06 ```p1 = path.line(0,0,5,5) t1 = p1.tangent(p1.begin()) p2 = p1.reversed() t2 = p2.tangent(p2.begin()) Oops! Calculating tangent t1 works fine but it fails for tangent t2, because p1 is a path, whose tangent method has a default value for the length argument def tangent(self, params, length=1): whereas p2 is a normpath, whose tangent method does not have a default value for the length argument def tangent(self, params, length): This seems to be inconsistent, doesn't it. Ciao Andreas ```
 Re: [PyX-devel] tangent in path.py and normpath.py From: André Wobst - 2008-05-15 07:51:12 ```Hi Andreas, Am 14.05.2008 um 14:25 schrieb Andreas Matthias: > because p1 is a path, whose tangent method has a default value for > the length argument > > def tangent(self, params, length=1): > > whereas p2 is a normpath, whose tangent method does not have a default > value for the length argument > > def tangent(self, params, length): > > This seems to be inconsistent, doesn't it. Indeed! Fixed! Thanks for pointing out this issue. André -- by _ _ _ Dr. André Wobst, Amselweg 22, 85716 Unterschleißheim / \ \ / ) wobsta@..., http://www.wobsta.de/ / _ \ \/\/ / PyX - High quality PostScript and PDF figures (_/ \_)_/\_/ with Python & TeX: visit http://pyx.sourceforge.net/ ```