Posts Tagged ‘Python’

Are your coding habits in the norm or are you a conventions rebel?

Here’s a fun little analysis of the popularity of specific coding conventions like: spaces vs tabs where are commas and so on for a few popular languages: JavaScript, Java, Python, and Scala. It’s based on analysis of code committed in GitHub. Unfortunately, no, there are a lot of languages that could be covered that aren’t […]

Tags:

Python Test Cases and Test Suites

Python Test Cases and Test Suites Unit testing revolves around the test case, which is the smallest building block of testable code for any circumstances that you’re testing. When you’re using PyUnit, a test case is a simple object with at least one test method that runs code; and when it’s done, it then compares […]

Tags:

Using the Python Database APIs

Using the Python Database APIs First, some history about Python and relational databases. Python’s support for relational databases started out with ad hoc solutions, with one solution written to interface with each particular database, such as Oracle. Each database module created its own API, which was highly specific to that database because each database vendor […]

Tags:

Python Functions

Python Functions: Grouping Code under a Name Most modern programming languages provide you with the capability to group code together under a name; and whenever you use that name, all of the code that was grouped together is invoked and evaluated without having to be retyped every time. To create a named function that will […]

Tags:

Using More Built-in Python Types

Using More Built-in Python Types Beside strings and numbers, Python provides four other important basic types: tuples, lists, sets, and dictionaries. These four types have a lot in common because they all allow you to group more than one item of data together under one name. Each one also gives you the capability to search […]

Tags: