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

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

Pythonic Alternative To Dict-style Setter?

People tend to consider getters and setters un-Pythonic, prefering to use @property instead. I'… Read more Pythonic Alternative To Dict-style Setter?

Accessing "module Scope" Vars

I'm currently learning Python, and I have to work on a Python 2.7 project. Accessing 'modul… Read more Accessing "module Scope" Vars

Is It A Good Practice To Add Names To __all__ Using A Decorator?

Is this a good practice in Python (from Active State Recipes -- Public Decorator)? import sys def … Read more Is It A Good Practice To Add Names To __all__ Using A Decorator?

Are There Any 'gotchas' With This Python Pattern?

Here's the pattern I'm thinking of using: class Dicty(dict): def __init__(self): … Read more Are There Any 'gotchas' With This Python Pattern?

Python 3.3 Socket Programming Error

In Python 3.3 I am getting an error while executing this line: print ('Message from server : &#… Read more Python 3.3 Socket Programming Error

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