On Tue, Jul 7, 2009 at 3:44 PM, Wyatt Baldwin<[email protected]> wrote: > > On Jul 7, 2:28 pm, Kyle VanderBeek <[email protected]> wrote: >> On Tue, Jul 7, 2009 at 1:09 PM, Mike Orr<[email protected]> wrote: >> > As a contrary view, 'map' is a logical name for it. Many people have >> > a variable 'file', which also shadows a builtin. 'route_map' is >> > oververbose, especially with long arguments. 'rmap' might be OK. >> >> Just because people "get away with" doing a dangerous thing doesn't >> make it an argument in favor of doing it. As almost anyone's father >> would opine, "Just because others are jumping off a cliff doesn't mean >> you should go do it too." That built-ins are not reserved words is a >> matter of design pragmatism in Python (keeping the grammar small) more >> than anything else. Leaving those names alone should be a matter of >> shared convention among coders to avoid confusion. > > [Hit Send accidentally last time] > > I don't agree that this is "dangerous." I don't even think it's a > slightly big deal. Sometimes `map` is the best name for a var; > sometimes `id` is. I rarely (never?) use those built-ins, and I'd > rather use the most appropriate (and not overly-verbose name) in a > local scope than worry about a name clash, which is unlikely and can > be easily worked around in those rare cases where it's an issue.
I don't want to get into a bikeshed argument over changing one local variable from three letters to nine. I just want to point out that there is opposition to the change, and that the status quo should get the benefit of the doubt. 'id' is another good point. This is way too useful and universal to disrupt just for purity. If you want purity, see Java, where the compiler forces you to. -- Mike Orr <[email protected]> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
