backports Package

backports Package

This module contains backported functions that are not present on Python 2.4 but are standard in more recent versions.

autotest.client.shared.backports.all(iterable)[source]

From http://stackoverflow.com/questions/3785433/python-backports-for-some-methods :codeauthor: Tim Pietzcker http://stackoverflow.com/users/20670/tim-pietzcker licensed under cc-wiki with attribution required

autotest.client.shared.backports.any(iterable)[source]

From http://stackoverflow.com/questions/3785433/python-backports-for-some-methods :codeauthor: Tim Pietzcker http://stackoverflow.com/users/20670/tim-pietzcker licensed under cc-wiki with attribution required

autotest.client.shared.backports.bin(number)[source]

Adapted from http://code.activestate.com/recipes/576847/ :codeauthor: Vishal Sapre :license: MIT

A foolishly simple look-up method of getting binary string from an integer This happens to be faster than all other ways!!!

autotest.client.shared.backports.next(*args)[source]

Retrieve the next item from the iterator by calling its next() method. If default is given, it is returned if the iterator is exhausted, otherwise StopIteration is raised. New in version 2.6.

Parameters:
  • iterator (iterator) – the iterator
  • default (object) – the value to return if the iterator raises StopIteration
Returns:

The object returned by iterator.next()

Return type:

object