Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #47625 > unrolled thread

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

Started byMark Janssen <dreamingforward@gmail.com>
First post2013-06-10 17:53 -0700
Last post2013-06-10 19:23 -0700
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: "Don't rebind built-in names*" - it confuses readers Mark Janssen <dreamingforward@gmail.com> - 2013-06-10 17:53 -0700
    Re: "Don't rebind built-in names*" - it confuses readers rusi <rustompmody@gmail.com> - 2013-06-10 19:23 -0700

#47625 — Re: "Don't rebind built-in names*" - it confuses readers

FromMark Janssen <dreamingforward@gmail.com>
Date2013-06-10 17:53 -0700
SubjectRe: "Don't rebind built-in names*" - it confuses readers
Message-ID<mailman.3004.1370912003.3114.python-list@python.org>
> 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

[toc] | [next] | [standalone]


#47628

Fromrusi <rustompmody@gmail.com>
Date2013-06-10 19:23 -0700
Message-ID<a7e9ac4e-b5e4-4350-8afe-f13051639a2a@a15g2000pbu.googlegroups.com>
In reply to#47625
On Jun 11, 5:53 am, Mark Janssen <dreamingforw...@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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web