#pep8 — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #pep8, aggregated by home.social.
-
At the recent @pycon, @cheukting_ho gave a talk on free threading, which was great BTW. She mentioned PEP 8, calling it the “King of PEPs” 👑
Giving it a read over. I’ve probably skim-read it at best — just doing what flake8 told me for years. 🫡
That the opening bit is “A Foolish Consistency is the Hobgoblin of Little Minds” is just lovely. 🥰
I wonder if “this style guide evolves over time” will mean that the 79 chars line length will be revisited? 🤔
https://peps.python.org/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds #PEP8 #Python
-
At the recent @pycon, @cheukting_ho gave a talk on free threading, which was great BTW. She mentioned PEP 8, calling it the “King of PEPs” 👑
Giving it a read over. I’ve probably skim-read it at best — just doing what flake8 told me for years. 🫡
That the opening bit is “A Foolish Consistency is the Hobgoblin of Little Minds” is just lovely. 🥰
I wonder if “this style guide evolves over time” will mean that the 79 chars line length will be revisited? 🤔
https://peps.python.org/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds #PEP8 #Python
-
At the recent @pycon, @cheukting_ho gave a talk on free threading, which was great BTW. She mentioned PEP 8, calling it the “King of PEPs” 👑
Giving it a read over. I’ve probably skim-read it at best — just doing what flake8 told me for years. 🫡
That the opening bit is “A Foolish Consistency is the Hobgoblin of Little Minds” is just lovely. 🥰
I wonder if “this style guide evolves over time” will mean that the 79 chars line length will be revisited? 🤔
https://peps.python.org/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds #PEP8 #Python
-
At the recent @pycon, @cheukting_ho gave a talk on free threading, which was great BTW. She mentioned PEP 8, calling it the “King of PEPs” 👑
Giving it a read over. I’ve probably skim-read it at best — just doing what flake8 told me for years. 🫡
That the opening bit is “A Foolish Consistency is the Hobgoblin of Little Minds” is just lovely. 🥰
I wonder if “this style guide evolves over time” will mean that the 79 chars line length will be revisited? 🤔
https://peps.python.org/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds #PEP8 #Python
-
At the recent @pycon, @cheukting_ho gave a talk on free threading, which was great BTW. She mentioned PEP 8, calling it the “King of PEPs” 👑
Giving it a read over. I’ve probably skim-read it at best — just doing what flake8 told me for years. 🫡
That the opening bit is “A Foolish Consistency is the Hobgoblin of Little Minds” is just lovely. 🥰
I wonder if “this style guide evolves over time” will mean that the 79 chars line length will be revisited? 🤔
https://peps.python.org/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds #PEP8 #Python
-
WHEREAS,
Most developers these days work with a GUI;
Most screens these days use a 16:9 aspect ratio;
Hardly anyone uses a screen resolution of less than 1920px horizontal;
Even at a font size of 14pt, one can fit approximately 180 monospace characters in a terminal of that width;NOW, THEREFORE, BE IT RESOLVED,
PEP 8's current 79-character line length limit be doubled.
-
WHEREAS,
Most developers these days work with a GUI;
Most screens these days use a 16:9 aspect ratio;
Hardly anyone uses a screen resolution of less than 1920px horizontal;
Even at a font size of 14pt, one can fit approximately 180 monospace characters in a terminal of that width;NOW, THEREFORE, BE IT RESOLVED,
PEP 8's current 79-character line length limit be doubled.
-
WHEREAS,
Most developers these days work with a GUI;
Most screens these days use a 16:9 aspect ratio;
Hardly anyone uses a screen resolution of less than 1920px horizontal;
Even at a font size of 14pt, one can fit approximately 180 monospace characters in a terminal of that width;NOW, THEREFORE, BE IT RESOLVED,
PEP 8's current 79-character line length limit be doubled.
-
WHEREAS,
Most developers these days work with a GUI;
Most screens these days use a 16:9 aspect ratio;
Hardly anyone uses a screen resolution of less than 1920px horizontal;
Even at a font size of 14pt, one can fit approximately 180 monospace characters in a terminal of that width;NOW, THEREFORE, BE IT RESOLVED,
PEP 8's current 79-character line length limit be doubled.
-
WHEREAS,
Most developers these days work with a GUI;
Most screens these days use a 16:9 aspect ratio;
Hardly anyone uses a screen resolution of less than 1920px horizontal;
Even at a font size of 14pt, one can fit approximately 180 monospace characters in a terminal of that width;NOW, THEREFORE, BE IT RESOLVED,
PEP 8's current 79-character line length limit be doubled.
-
PEP — это не стиль. это язык, которым ты думаешь о коде
Я долго думала, что PEP — это про оформление. PEP 8: называй переменные вот так, PEP 257: пиши докстринги вот так. Потом начала использовать их по‑настоящему и выяснилось, что часть из них вообще не про то, как выглядит код!
https://habr.com/ru/articles/1006908/
#pep8 #pep544 #pep698 #pep634 #pep695 #python312 #python3 #python
-
PEP — это не стиль. это язык, которым ты думаешь о коде
Я долго думала, что PEP — это про оформление. PEP 8: называй переменные вот так, PEP 257: пиши докстринги вот так. Потом начала использовать их по‑настоящему и выяснилось, что часть из них вообще не про то, как выглядит код!
https://habr.com/ru/articles/1006908/
#pep8 #pep544 #pep698 #pep634 #pep695 #python312 #python3 #python
-
PEP — это не стиль. это язык, которым ты думаешь о коде
Я долго думала, что PEP — это про оформление. PEP 8: называй переменные вот так, PEP 257: пиши докстринги вот так. Потом начала использовать их по‑настоящему и выяснилось, что часть из них вообще не про то, как выглядит код!
https://habr.com/ru/articles/1006908/
#pep8 #pep544 #pep698 #pep634 #pep695 #python312 #python3 #python
-
Nomear variáveis é um ato de design, não de estética.
No meu novo artigo, mostro como combinar Clean Architecture e PEP 8 para escrever nomes claros, concisos e inteligentes em Python — com exemplos reais e um mini refactor no final.
Compartilhe boas práticas e vamos conversar sobre código que se explica sozinho. #Python #CleanArchitecture #PEP8 #BoasPráticas #EngenhariaDeSoftware
-
Nomear variáveis é um ato de design, não de estética.
No meu novo artigo, mostro como combinar Clean Architecture e PEP 8 para escrever nomes claros, concisos e inteligentes em Python — com exemplos reais e um mini refactor no final.
Compartilhe boas práticas e vamos conversar sobre código que se explica sozinho. #Python #CleanArchitecture #PEP8 #BoasPráticas #EngenhariaDeSoftware
-
Nomear variáveis é um ato de design, não de estética.
No meu novo artigo, mostro como combinar Clean Architecture e PEP 8 para escrever nomes claros, concisos e inteligentes em Python — com exemplos reais e um mini refactor no final.
Compartilhe boas práticas e vamos conversar sobre código que se explica sozinho. #Python #CleanArchitecture #PEP8 #BoasPráticas #EngenhariaDeSoftware
-
Nomear variáveis é um ato de design, não de estética.
No meu novo artigo, mostro como combinar Clean Architecture e PEP 8 para escrever nomes claros, concisos e inteligentes em Python — com exemplos reais e um mini refactor no final.
Compartilhe boas práticas e vamos conversar sobre código que se explica sozinho. #Python #CleanArchitecture #PEP8 #BoasPráticas #EngenhariaDeSoftware
-
Nomear variáveis é um ato de design, não de estética.
No meu novo artigo, mostro como combinar Clean Architecture e PEP 8 para escrever nomes claros, concisos e inteligentes em Python — com exemplos reais e um mini refactor no final.
Compartilhe boas práticas e vamos conversar sobre código que se explica sozinho. #Python #CleanArchitecture #PEP8 #BoasPráticas #EngenhariaDeSoftware
-
-
-
-
-
-
Код, за который не стыдно: Практика чистописания для начинающих Python-разработчиков
Каждый из нас хотя бы раз в жизни писал код, который можно описать фразой: «Ну, оно как-то работает, лучше не трогать». Мы наспех добавляем костыль, чтобы успеть к дедлайну, оставляем переменную с именем data2 или пишем функцию на 200 строк, обещая себе вернуться к ней «позже». И знаете что? Это «позже» никогда не наступает.
-
Код, за который не стыдно: Практика чистописания для начинающих Python-разработчиков
Каждый из нас хотя бы раз в жизни писал код, который можно описать фразой: «Ну, оно как-то работает, лучше не трогать». Мы наспех добавляем костыль, чтобы успеть к дедлайну, оставляем переменную с именем data2 или пишем функцию на 200 строк, обещая себе вернуться к ней «позже». И знаете что? Это «позже» никогда не наступает.
-
Код, за который не стыдно: Практика чистописания для начинающих Python-разработчиков
Каждый из нас хотя бы раз в жизни писал код, который можно описать фразой: «Ну, оно как-то работает, лучше не трогать». Мы наспех добавляем костыль, чтобы успеть к дедлайну, оставляем переменную с именем data2 или пишем функцию на 200 строк, обещая себе вернуться к ней «позже». И знаете что? Это «позже» никогда не наступает.
-
[Перевод] PEP 8 как религия: почему Python сам не соблюдает свои же правила
Команда Python for Devs подготовила перевод статьи о PEP 8. Мысль проста: споры о стиле в Python часто сводятся к одному — snake_case против camelCase. Даже сам Python не следует своим же правилам. Так стоит ли вообще относиться к PEP 8 как к догме?
https://habr.com/ru/articles/953412/
#Python #PEP8 #стиль_кода #читаемость #snake_case #camelCase #закон_Свейгарта #правила #разработчики #open_source
-
[Перевод] PEP 8 как религия: почему Python сам не соблюдает свои же правила
Команда Python for Devs подготовила перевод статьи о PEP 8. Мысль проста: споры о стиле в Python часто сводятся к одному — snake_case против camelCase. Даже сам Python не следует своим же правилам. Так стоит ли вообще относиться к PEP 8 как к догме?
https://habr.com/ru/articles/953412/
#Python #PEP8 #стиль_кода #читаемость #snake_case #camelCase #закон_Свейгарта #правила #разработчики #open_source
-
[Перевод] PEP 8 как религия: почему Python сам не соблюдает свои же правила
Команда Python for Devs подготовила перевод статьи о PEP 8. Мысль проста: споры о стиле в Python часто сводятся к одному — snake_case против camelCase. Даже сам Python не следует своим же правилам. Так стоит ли вообще относиться к PEP 8 как к догме?
https://habr.com/ru/articles/953412/
#Python #PEP8 #стиль_кода #читаемость #snake_case #camelCase #закон_Свейгарта #правила #разработчики #open_source
-
I’ve already made good progress in refactoring my python code. Thanks to my new love, PEP8 ❤️
-
I’ve already made good progress in refactoring my python code. Thanks to my new love, PEP8 ❤️
-
I’ve already made good progress in refactoring my python code. Thanks to my new love, PEP8 ❤️
-
I’ve already made good progress in refactoring my python code. Thanks to my new love, PEP8 ❤️
-
I’ve already made good progress in refactoring my python code. Thanks to my new love, PEP8 ❤️
-
Использование подчеркивания в коде на Python
Подчёркивание _ — это символ, который используются в именах в коде на Питоне. Он влияет на то, как код работает и как код читают. Знания о том, куда поместить подчёркивание, помогает писать код.
-
Использование подчеркивания в коде на Python
Подчёркивание _ — это символ, который используются в именах в коде на Питоне. Он влияет на то, как код работает и как код читают. Знания о том, куда поместить подчёркивание, помогает писать код.
-
Использование подчеркивания в коде на Python
Подчёркивание _ — это символ, который используются в именах в коде на Питоне. Он влияет на то, как код работает и как код читают. Знания о том, куда поместить подчёркивание, помогает писать код.
-
Style guide news!
Do you write C code for CPython itself?
PEP 7 (Style Guide for C Code) has been updated to allow putting newlines before operators, "Knuth style":
if (type->tp_dictoffset != 0
&& base->tp_dictoffset == 0
&& type->tp_dictoffset == b_size
&& (size_t)t_size == b_size + sizeof(PyObject *))
{
return 0;
}This is similar to PEP 8 and Black style for Python code.
https://github.com/python/peps/pull/3931/files
-
Style guide news!
Do you write C code for CPython itself?
PEP 7 (Style Guide for C Code) has been updated to allow putting newlines before operators, "Knuth style":
if (type->tp_dictoffset != 0
&& base->tp_dictoffset == 0
&& type->tp_dictoffset == b_size
&& (size_t)t_size == b_size + sizeof(PyObject *))
{
return 0;
}This is similar to PEP 8 and Black style for Python code.
https://github.com/python/peps/pull/3931/files
-
Style guide news!
Do you write C code for CPython itself?
PEP 7 (Style Guide for C Code) has been updated to allow putting newlines before operators, "Knuth style":
if (type->tp_dictoffset != 0
&& base->tp_dictoffset == 0
&& type->tp_dictoffset == b_size
&& (size_t)t_size == b_size + sizeof(PyObject *))
{
return 0;
}This is similar to PEP 8 and Black style for Python code.
https://github.com/python/peps/pull/3931/files
-
Style guide news!
Do you write C code for CPython itself?
PEP 7 (Style Guide for C Code) has been updated to allow putting newlines before operators, "Knuth style":
if (type->tp_dictoffset != 0
&& base->tp_dictoffset == 0
&& type->tp_dictoffset == b_size
&& (size_t)t_size == b_size + sizeof(PyObject *))
{
return 0;
}This is similar to PEP 8 and Black style for Python code.
https://github.com/python/peps/pull/3931/files
-
Style guide news!
Do you write C code for CPython itself?
PEP 7 (Style Guide for C Code) has been updated to allow putting newlines before operators, "Knuth style":
if (type->tp_dictoffset != 0
&& base->tp_dictoffset == 0
&& type->tp_dictoffset == b_size
&& (size_t)t_size == b_size + sizeof(PyObject *))
{
return 0;
}This is similar to PEP 8 and Black style for Python code.
https://github.com/python/peps/pull/3931/files
-
Улучшаем python код в пару кликов
Разрабатывая огромные проекты в команде сталкиваешься с проблемой, что люди не понимают друг друга, и каждый пишет в своей стилистике. Поэтому в дальнейшем будет трудно поддерживать этот код В статье научимся писать код в единой стилистике и даже делать это автоматически. Улучшать проекты!
-
Улучшаем python код в пару кликов
Разрабатывая огромные проекты в команде сталкиваешься с проблемой, что люди не понимают друг друга, и каждый пишет в своей стилистике. Поэтому в дальнейшем будет трудно поддерживать этот код В статье научимся писать код в единой стилистике и даже делать это автоматически. Улучшать проекты!
-
Улучшаем python код в пару кликов
Разрабатывая огромные проекты в команде сталкиваешься с проблемой, что люди не понимают друг друга, и каждый пишет в своей стилистике. Поэтому в дальнейшем будет трудно поддерживать этот код В статье научимся писать код в единой стилистике и даже делать это автоматически. Улучшать проекты!
-
Checking for an empty list in Python - Python Morsels (@treyhunner)
Various methods to check if a list is empty in Python:
➡️ checking the list's length,
➡️ evaluating the list's truthiness
➡️ comparing the list to another empty list#Python #Truthiness #PEP8 #DuckTyping #Programming #PythonProgramming
https://www.pythonmorsels.com/checking-for-an-empty-list-in-python/
-
Checking for an empty list in Python - Python Morsels (@treyhunner)
Various methods to check if a list is empty in Python:
➡️ checking the list's length,
➡️ evaluating the list's truthiness
➡️ comparing the list to another empty list#Python #Truthiness #PEP8 #DuckTyping #Programming #PythonProgramming
https://www.pythonmorsels.com/checking-for-an-empty-list-in-python/
-
Checking for an empty list in Python - Python Morsels (@treyhunner)
Various methods to check if a list is empty in Python:
➡️ checking the list's length,
➡️ evaluating the list's truthiness
➡️ comparing the list to another empty list#Python #Truthiness #PEP8 #DuckTyping #Programming #PythonProgramming
https://www.pythonmorsels.com/checking-for-an-empty-list-in-python/
-
Checking for an empty list in Python - Python Morsels (@treyhunner)
Various methods to check if a list is empty in Python:
➡️ checking the list's length,
➡️ evaluating the list's truthiness
➡️ comparing the list to another empty list#Python #Truthiness #PEP8 #DuckTyping #Programming #PythonProgramming
https://www.pythonmorsels.com/checking-for-an-empty-list-in-python/
-
Checking for an empty list in Python - Python Morsels (@treyhunner)
Various methods to check if a list is empty in Python:
➡️ checking the list's length,
➡️ evaluating the list's truthiness
➡️ comparing the list to another empty list#Python #Truthiness #PEP8 #DuckTyping #Programming #PythonProgramming
https://www.pythonmorsels.com/checking-for-an-empty-list-in-python/
-
Основы чистого кода на Python (PEP8, SOLID, ООП) ::: часть 1
Когда вы уже написали несколько своих небольших пет-проектов, вы начинаете понимать что чистый код, архитектура и другие паттерны программирования начинают иметь смысл. В масштабируемых, командный или коммерческих проектах это несет особую ценность. Изучив эти принципы, новички получат представление о построении надежных, гибких и легко тестируемых приложений, что позволит им сохранить ясность кодовой базы и возможность ее сопровождения по мере роста их проектов. В этой статье мы разберем: что такое PEP8, что такое SOLID и какие есть правила написания чистого кода. А во второй части мы разберем что такое poetry, тесты и методологии разработки.
https://habr.com/ru/articles/836678/
#python #clean_code #clean_architecture #pep8 #SOLID #DRY #KISS #unixway #чистый_код #ООП
-
Основы чистого кода на Python (PEP8, SOLID, ООП) ::: часть 1
Когда вы уже написали несколько своих небольших пет-проектов, вы начинаете понимать что чистый код, архитектура и другие паттерны программирования начинают иметь смысл. В масштабируемых, командный или коммерческих проектах это несет особую ценность. Изучив эти принципы, новички получат представление о построении надежных, гибких и легко тестируемых приложений, что позволит им сохранить ясность кодовой базы и возможность ее сопровождения по мере роста их проектов. В этой статье мы разберем: что такое PEP8, что такое SOLID и какие есть правила написания чистого кода. А во второй части мы разберем что такое poetry, тесты и методологии разработки.
https://habr.com/ru/articles/836678/
#python #clean_code #clean_architecture #pep8 #SOLID #DRY #KISS #unixway #чистый_код #ООП
-
Основы чистого кода на Python (PEP8, SOLID, ООП) ::: часть 1
Когда вы уже написали несколько своих небольших пет-проектов, вы начинаете понимать что чистый код, архитектура и другие паттерны программирования начинают иметь смысл. В масштабируемых, командный или коммерческих проектах это несет особую ценность. Изучив эти принципы, новички получат представление о построении надежных, гибких и легко тестируемых приложений, что позволит им сохранить ясность кодовой базы и возможность ее сопровождения по мере роста их проектов. В этой статье мы разберем: что такое PEP8, что такое SOLID и какие есть правила написания чистого кода. А во второй части мы разберем что такое poetry, тесты и методологии разработки.
https://habr.com/ru/articles/836678/
#python #clean_code #clean_architecture #pep8 #SOLID #DRY #KISS #unixway #чистый_код #ООП
-
Sometimes I wish #Python had stricter standards. Example: the max length that regulates #PEP8 is 79, but #Black maintained by the same Python suggests 88 by default.
All these years programming with Python, I've been trying to use standards closer to PEP 8 and it would be nice to have an effortless Python setup, but apparently everyone is lost in this sense. -
Sometimes I wish #Python had stricter standards. Example: the max length that regulates #PEP8 is 79, but #Black maintained by the same Python suggests 88 by default.
All these years programming with Python, I've been trying to use standards closer to PEP 8 and it would be nice to have an effortless Python setup, but apparently everyone is lost in this sense.