Function returns old value

Chris Angelico rosuav at gmail.com
Fri Dec 11 21:47:54 EST 2020


On Sat, Dec 12, 2020 at 1:39 PM dn via Python-list
<python-list at python.org> wrote:
>
> On 12/12/2020 15:25, Chris Angelico wrote:
> > On Sat, Dec 12, 2020 at 1:23 PM dn via Python-list
> > <python-list at python.org> wrote:
> >>
> >> Speaking personally, I prefer the code to be included in the email.
> >> However, it would be better to use spaces rather than tabs (Python's
> >> preferred style, per PEP-8) because many email packages implement
> >> tab-stops as eight-spaces apart.
> >>
> >
> > Be careful of wording here. PEP 8 does not specify that all Python
> > code should use spaces rather than tabs. Tabs are absolutely fine for
> > your code.
>
> Hence "preferred", cf "prescribed" or "required".

It's not even that. It's required for the standard library, and not at
all a language recommendation elsewhere.

> My personal reaction when ppl do make such a demand, is to use the
> facility built-in to decent editors/IDEs to change from one to the other
> - no fuss, no muss; peace reigns amongst the team once again...!
>
> Wish could do that with such ease in other applications!

Ah yes, and then you have these massive source control diffs when you
do a meaningless conversion over large slabs of the code! Perfect,
just what we wanted.

For teams that disagree on the correct width of indentation levels,
why not standardize on a single token meaning "indentation level", and
then allow everyone to configure their editors to show it at whatever
width they prefer?

> Nevertheless, email-client observation applies...

Yes. Make sure you use an email client that supports leading
whitespace of all forms. Otherwise you're not going to have a good
time of it.

ChrisA


More information about the Python-list mailing list