"Don't rebind built-in names*" - it confuses readers

rusi rustompmody at gmail.com
Mon Jun 10 22:23:50 EDT 2013


On Jun 11, 5:53 am, Mark Janssen <dreamingforw... at gmail.com> wrote:
> > There's a subtle difference between a keyword and a built-in.  Good
> > Python style generally avoids masking built-ins but allows it:
>
> Right, thank you for reminding me.  My C-mind put them in the same category.
> --
> MarkJ
> Tacoma, Washington

Dont know what you mean.  This is working C:
---------------------
#include <stdio.h>
int getpid = 4;
main()
{
  printf("pid is %d\n", getpid);
}
---------------------
As is this
---------------------
#include <stdio.h>
main()
{
  printf("pid is %d\n", getpid());
}
---------------------

The first prints 4; the second prints the pid.
gcc 4.7



More information about the Python-list mailing list