[C++-sig] working around the non-const Python C API (original) (raw)

Tim Peters tim.peters at gmail.com
Fri Dec 2 21:22:59 CET 2005


[Jeremy Hylton]

... Secondarily, I know that python-dev is a bit hesitant about const correctness, but we did get some const char* types added with the new bytecode compiler. Perhaps it's worthwhile to try changing a few of the most egregious cases to use const char*.

Nobody will complain about adding const where its lack gets in the way. What python-dev doesn't want is another of those massive checkins where someone more-or-less mindlessly adds const to every place they can find, introducing a handful of subtle bugs along the way that create new problems for years. If you're actively working on a specific area where adding const eases the pain, that's fine -- then you're really thinking about each const you add, and testing it right away too. That's all good.



More information about the Cplusplus-sig mailing list