Namespaces: memory vs 'pollution'

Ethan Furman ethan at stoneleaf.us
Tue Jul 23 10:46:31 EDT 2019


On 07/22/2019 08:12 PM, DL Neil wrote:
> On 22/07/19 9:40 PM, Thomas Jollans wrote:

>> Just FYI, in the scientific Python community certain short abbreviations
>> are the norm. Many modules have a ‘standard’ abbreviation that most
>> people use, minimizing confusion.
>>
>> import numpy as np
>> import matplotlib as mpl
>> from matplotlib import pyplot as plt
>> import pandas as pd
>> import xarray as xr

> The use of meaningful names is a minimum professional standard (IMHO), and in my experience, a virtue that pays for itself. I am ever-so grateful that most modern text-editors will guess/read-my-mind and save the typing!

It's not just typing, but reading.  Long names, when used over and over, become noise.

--
~Ethan~



More information about the Python-list mailing list