[Scons-users] conventions for AddMethod

Bill Deegan bill at baddogconsulting.com
Mon Dec 11 10:18:35 EST 2017


I wonder if there's a way to add the info to your ctags file?

On Mon, Dec 11, 2017 at 10:02 AM, Mats Wichmann <mats at wichmann.us> wrote:

> On 12/10/2017 12:11 PM, Bill Deegan wrote:
> > I have not strong opinions on this one.
> >
> > Pythonically the _ should represent functions which shouldn't get called
> > (or called directly) from outside the module.
> > I'm not sure in any case calling any of the methods added via AddMethod
> > outside of the env, or DefaultEnvironment make sense.
> > So you could argue _ should be used for all of them.
> >
> > That said, I don't think it's worth changing all the existing code from
> one
> > to the other.
> > (Lots of other tasks to be done would provide more utility for the
> project).
>
> To be clear (if it wasn't), I was not proposing any changes to scons, I
> was trying to note that the scons source code did not provide a
> "consensus opinion" since both ways are used.
>
> In my specific case, if I have a tags file, and I'm editing in vim, and
> I have the cursor on what looks like a function call and press ^] to
> jump to that function, if the name was created by AddMethod to refer to
> an actual function of a different name, then there just won't be a tag
> to jump to, as ctags has no idea about this binding.   Or if I have an
> IDE and want to hover over the name to have it display call tips, there
> would be nothing there, because the function has a different name.
>
> Meanwhile, there's certainly validity to the viewpoint that these
> functions should not be called outside of their special context and so
> "hiding" them (in the limited sense Python can do that) makes some sense.
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20171211/75f66fb6/attachment.html>


More information about the Scons-users mailing list