Skip to content Skip to sidebar Skip to footer
Showing posts with the label Coding Style

Python Style Guide: Intermittent Variables

I was searching for a Python style guide in terms of 'intermittent variables' and readabili… Read more Python Style Guide: Intermittent Variables

Resolving How To Give An Attribute In A Class In Python

I have the following class: class Point(object): __slots__= ('x','y','z'… Read more Resolving How To Give An Attribute In A Class In Python

How Do I Avoid Users Of My Code Having To Type Redundant Import Lines?

So I have a project called 'Pants' that lives on GitHub.com. Originally the project was a … Read more How Do I Avoid Users Of My Code Having To Type Redundant Import Lines?

How To Cleanly Keep Below 80-char Width With Long Strings?

I'm attempting to keep my code to 80 chars or less nowadays as I think it looks more aesthetica… Read more How To Cleanly Keep Below 80-char Width With Long Strings?

In Python, What's The Best Way To Avoid Using The Same Name For A __init__ Argument And An Instance Variable?

Whats the best way to initialize instance variables in an init function. Is it poor style to use th… Read more In Python, What's The Best Way To Avoid Using The Same Name For A __init__ Argument And An Instance Variable?

What's The Preferred Way To Include Unicode In Python Source Files?

When using unicode strings in source code, there seems to be many ways to skin a cat. The docs and… Read more What's The Preferred Way To Include Unicode In Python Source Files?