This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### See http://j.mp/ffN320 | |
$ cat /etc/lsb-release | |
DISTRIB_ID=Ubuntu | |
DISTRIB_RELEASE=9.10 | |
DISTRIB_CODENAME=karmic | |
DISTRIB_DESCRIPTION="Ubuntu 9.10" | |
$ mkdir mydir | |
$ cd mydir | |
$ touch test.h test.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | |
' WinUnit - Maria Blees (maria.blees@microsoft.com) | |
' | |
' [ With modifications by Nate Silva to fix "Current function is not a WinUnit | |
' test (BEGIN_TEST)" - see http://goo.gl/Znfb ] | |
' | |
' This module contains macros for running tests. | |
' | |
' In order to use these, make sure that the variable | |
' WinUnitPath in the _Variables module is set to where |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example showing how Python default argument handling causes a bug | |
# when using the ReportLab library for Python. Tested against | |
# ReportLab 2.3. | |
# | |
# See http://gist.github.com/246507 for a generic Python example. | |
from reportlab.platypus import * | |
def main(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example showing how a subtlety in the way Python handles default | |
# arguments can cause a bug. | |
class C(object): | |
def __init__(self, list1=[], list2=None): | |
# Wrong: if the list1 default argument of [] is used, that | |
# default will be *shared* among all instances of the class. | |
# If it is later modified, other instances can unexpectedly | |
# inherit the modifications. | |
self.list1 = list1 |
NewerOlder