Question about math.pi is mutable

Marko Rauhamaa marko at pacujo.net
Sat Nov 7 13:00:29 EST 2015


Grant Edwards <invalid at invalid.invalid>:

> I take it you don't write embedded code that runs from ROM? I do. The
> const keyword is the most valuable addition to the C language since
> the function prototype. Without it, you used to have to jump through
> all sorts of hoops to get read-only data placed into read-only memory.

If all you need is a linker directive that places data in a read-only
section, "const" is a very ineffective tool that clutters the code and
forces you to sprinkle type casts around your code.


Marko



More information about the Python-list mailing list