On Thu, 21 Feb 2019 11:59:56 -0800
Raymond Hettinger
wrote:
>
> PEP 8 is mostly about readability. However, the line length limit often
> seems to cause less readable code.
There are well-known typography rules around line length and
readability, both on screen and in print. See e.g.:
https:/
A general rule of thumb is, if Python feels inconvenient or awkward, you’re
doing something wrong.
___
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofc
>
>
> Chris, the convention to limit text to somewhere around 60-80 characters
> predates old terminals by *literally centuries*.
Not for code, it doesn’t— and centuries ago, there were other technical
issues on play for papermaking, hand writing, and typesetting.
>
(And did they ever stop to wo
On 2/21/19 10:33 PM, Steven D'Aprano wrote:
(And did they ever stop to wonder why those old terminals
standardized on 80 columns?)
Punch cards?
https://softwareengineering.stackexchange.com/questions/148677
There's an ensuing discussion regarding the history of the
size/shape of the punch ca
Raymond Hettinger posted a helpful example to this list. Here, I run
his example, and a variant, through https://black.now.sh
Raymond
class Frabawidget:
@wozzle.setter
def wibble(self, woozle):
if not (self.min_woozle < woozle < self.max_woozle):
raise ValueError(f"Exp
On Sat, Feb 23, 2019 at 5:32 AM Juancarlo Añez wrote:
> On Thu, Feb 21, 2019 at 11:32 PM Chris Angelico wrote:
>>
>> On Fri, Feb 22, 2019 at 2:27 PM Juancarlo Añez wrote:
>> > Then, if exceptions are going to be part of a type, there should be a way
>> > to express the semantics of them (like i
On Thu, Feb 21, 2019 at 11:32 PM Chris Angelico wrote:
> On Fri, Feb 22, 2019 at 2:27 PM Juancarlo Añez wrote:
> > Then, if exceptions are going to be part of a type, there should be a
> way to express the semantics of them (like in Eiffel), so
> stack.pop();stack.push(x) doesn't have to catch S
Christopher Barker wrote:
(And did they ever stop to wonder why those old terminals
standardized on 80 columns?)
Probably because IBM decided on 80 columns for their punched cards.
And that probably didn't have anything to do with a readable width
for text. Nobody used computers for wo
On 2019-02-21 03:09, Christopher Barker wrote:
>
> But yes, there is no (easy) way to distinguish an Exception raised by
the function you called, and one raised somewhere deeper that.
>
> And I have been bitten by that more than once. It makes "Easier to ask
forgiveness than permission" kind of tr
On Sat, Feb 23, 2019 at 9:14 AM Kyle Lahnakoski wrote:
> Let me call this pattern the Catch-It-Name-It-Chain-It-Raise-It (CNCR)
> pattern
>
> There are a few reasons for this.
>
> 1. I can add runtime values to the exception so I get a better sense of
> the program state without going to the debug
On Fri, Feb 22, 2019 at 5:10 PM Greg Ewing
wrote:
> I would say it the other way around. Once you've reduced the complexity
> of a line to something a human can handle, *most* of the time 80 chars
> is enough.
>
+1
It has been known for a very long time.
These are *old *books that talk about *
11 matches
Mail list logo