Interesting, are you both sure ./.pdbrc should be the first file? I was
expecting
the order to always go from "most general" to "most specific", i.e.,
"system" -> "home" -> "current". This way, it would be straightforward
to have general configuration in a "system"/"home" configuration which can
be overwritten in a more specialized one ("current").

Coincidentally, this is also the order GDB is using:
   https://sourceware.org/gdb/current/onlinedocs/gdb#Startup

Any particular reason you guys prefer a different order?

> Not your job, but I bet you get "are there other stdlib applications
> that would benefit from this change?" as feedback.  Eg, IDLE.

Probably, but lets start the discussion somewhere!

Best regards,
Gustaf


Den ons 19 apr. 2023 kl 17:11 skrev turnbull <turnb...@sk.tsukuba.ac.jp>:

> I apologize for the top-post and awkward trimming, my employer just
> switched to o365 and won't accomodate my existing mail client so I'm
> stuck with a crappy webmail client on this address. :-p
>
> I agree with Barry on both points: seems like a good idea, but the
> search priority should be
> ./.pdbrc first.
>
> Not your job, but I bet you get "are there other stdlib applications
> that would benefit from this change?" as feedback.  Eg, IDLE.
>
> 2023-04-19 02:50 に Barry さんは書きました:
>
> >>    +            for rcFileName in ('${XDG_CONFIG_HOME}/python/pdbrc',
> >>    +                               '~/.config/python/pdbrc',
> >>    +                               '~/.pdbrc',
> >>    +                               '.pdbrc'):
> > I would expect .pdbrc to be first.
> >
> >>    +                rcPath =
> >> os.path.expanduser(os.path.expandvars(rcFileName))
> >>    +                try:
> >>    +                    with open(rcPath, encoding='utf-8') as rcFile:
> >>    +                        self.rcLines.extend(rcFile)
> >>    +                except OSError:
> >>    +                    pass
> >>
> >>             self.commands = {} # associates a command list to
> >> breakpoint numbers
> >>             self.commands_doprompt = {} # for each bp num, tells if
> >> the prompt
> >
> > Try raising a python bug and a PR with this code in it.
> > Seems reasonable change to support.
> >
> > Barry
>
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/XXU2TAW7P4AAFL62ACDTB3FF5WLV3DEG/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to