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

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?

Pythonic Way To Implement A Tokenizer

I'm going to implement a tokenizer in Python and I was wondering if you could offer some style … Read more Pythonic Way To Implement A Tokenizer

Correct Style For Element-wise Operations On Lists Without Numpy (python)

I would like to operate on lists element by element without using numpy, for example, i want add([1… Read more Correct Style For Element-wise Operations On Lists Without Numpy (python)

Using The Name "function" For A Variable In Python Code

Is using the word function for the name of an argument considered bad style in Python code? def con… Read more Using The Name "function" For A Variable In Python Code

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?

Tool To Enforce Python Code Style/standards

I'm trying to find a tool to check for coding style in python. For PHP I've seen there is t… Read more Tool To Enforce Python Code Style/standards

Adding Function To Sys.excepthook

Say I have something like this, which sends unhanded exceptions to logging.critical(): import sys … Read more Adding Function To Sys.excepthook

Implement A Script In A Function. Some Suggestions?

first of all, i am quite new in Python (an programming area) but i wish to learn and convert a func… Read more Implement A Script In A Function. Some Suggestions?