[GRASS-dev] [GRASS GIS] #2581: Fix Python ctypes conversion for stat64 struct on GNU/Hurd
GRASS GIS
trac at osgeo.org
Tue Feb 10 14:05:57 PST 2015
#2581: Fix Python ctypes conversion for stat64 struct on GNU/Hurd
---------------------------+------------------------------------------------
Reporter: sebastic | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Python ctypes | Version: svn-releasebranch70
Keywords: | Platform: Other Unix
Cpu: x86-32 |
---------------------------+------------------------------------------------
Comment(by sebastic):
Replying to [comment:2 glynn]:
> It would be better to use Python's own conditional-expression syntax (a
if cond else b). The and-or hack produces the wrong answer if the if-true
expression evaluates to false.
Yes, I'm aware of the recommendation to use if/else instead of and/or in
Python in place of the ?: ternary operator in C.
I kept the patch as minimal as possible to only fix the nesting issue.
I've now updated the patch to also use if/else instead of and/or.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2581#comment:3>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list