Changing return value for mutating list methods

License: Freeware
Date Added: 08 April, 2013
Category: Scripts / Others
Author: activestate.com

Mutating list methods such as 'append' or 'extend' return None instead of the (mutated) list itself. Sometimes, this is not the desired behaviour.


Advertisements



 

Mutating list methods such as 'append' or 'extend' return None instead of the (mutated) list itself. Sometimes, this is not the desired behaviour. To have a reference to the (mutated) list returned is usefull, if one wants to chain commands such as mylistinstance.append(7).sort().


Operating Systems:  Python, Windows, Linux, BSD, Solaris, Mac OS


Changing return value for mutating list methods Related Downloads
 
Download Mail2List 0.1.3

Mail2List 0.1.3  Multiple mailing lists can be created. InstallationUnpack and upload it to the /wp-content/plugins/ directory.Activate the plugin through the 'Plugins' menu in WordPress.

Download Zam Module 1.1

Zam Module 1.1  Zam module contains "array" and "matrix". An array is 1D list with fixed sized and mutable internals. A  matrix is the same except for the fact that it is 2D.

Download List and dictionary observer 1.0

List and dictionary observer 1.0  This script implements an observer pattern for dictionaries and lists. It does not support a one-many relation. The observer is sent enough information so that the change can be undone.

Download Binary search in one line 1.1

Binary search in one line 1.1  This is an implementation of the binary search algorithm in (almost) one line. Given a number 'n' and a list 'L', the function returns the index of the number on the list, or -1.

Download Find the most frequent elements 1.1

Find the most frequent elements 1.1  This script returns a sorted list of the most common to least common elements and their counts. If n is specified, return only the n most common elements.

Download Bag collection class 1.0

Bag collection class 1.0  Bag collection class script implements Smalltalk's bag class.

Download The Hat 3.1.0.3

The Hat 3.1.0.3  Just like drawing names from a hat to determine a random order for a group of people or to choose individual random names or pairs. Great for selecting raffle or sweepstakes winners or for parents or teachers to decide a random order for kids.

Download MailList Controller Free 6.5

MailList Controller Free 6.5  MailList Controller is an email mailing list and marketing solution designed to send out personalized newsletters, campaigns, e-zines, announcements, support and group mails.

Download Cache Lister for WinGate 0.6

Cache Lister for WinGate 0.6  Generates a listing of all URLs which are currently in WinGates cache. The listing also contains the name of the cache file associated with the URL, so you can remove unwanted or old content from the cache by simply deleting the cache file.

Others Popular Downloads
 
Download mvnForum .2GA 1.0

mvnForum .2GA 1.0  mvnForum is an open source, powerful, easy to use, easy to setup bulletin board (forum) built on the Java J2EE technology (Jsp/Servlet). mvnForum is compatible with any Servlet Containers which supports Jsp 1.2 and Servlet 2.3.

Download Aardvark Topsites PHP 5.2.0

Aardvark Topsites PHP 5.2.0  Aardvark Topsites PHP has a ton of features. I'm not going to bore you with all the inane details, but here is a list of the main features. - Members ranks can be shown on their button.

Download Guestbook class 1.0

Guestbook class 1.0  This class is meant to manage a guest book storing its records either in XML files database or in a SQL database. Currently it supports only MySQL databases.

Download lilURL 0.1.1

lilURL 0.1.1  lilURL is a simple PHP/MySQL script for generating shorter URLs. It's similar to TinyURL, Shorl, MakeAShorterLink, etc, but you can run it on your own server ((which is pretty much the same thing as TightURL).

Download MOC Designs PHP News 1.1

MOC Designs PHP News 1.1  MOC Designs PHP News is a PHP-SQL powered, dynamic, news editor and displayer. Adding news on your website is done through a web-page form, saving you the time of editing your news page and then uploading the news page again.

Download Php Board Script 6.4.3

Php Board Script 6.4.3  Php Board Script allows you to create a simple discussion forum. It is made in Php, without My SQL, which on each server or Webspace is installed in well 5 minutes.

Download CMS Mini 0.2.2

CMS Mini 0.2.2  CMS Mini is a very small PHP application for manage content for small web sites. Not intended for a cooperative group of editors and rewiers: simply one editor can insert new contents, immediatly pubblished on web: "one task, one click".

Download m-phorum 0.3

m-phorum 0.3  m-phorum is a new small phorum, using PHP with one mysql database backend. Tested on php 4.3, apache 1.3.27 & mysql 3.23.52. It is simple and fast.

Download PDF::Reader 1.0

PDF::Reader 1.0  The PDF::Reader library implements a PDF parser conforming as much as possible to the PDF specification from Adobe.

Submit Reviews for Changing return value for mutating list methods
- required fields