You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 KiB

1c-api/arg:refPyArg_ParseTuple(args, "O|O:ref", &object, &callback)
2c-api/list:highlist[low:high]
3c-api/sequence:i2o[i1:i2]
4c-api/unicode:endstr[start:end]
5distutils/setupscript::
6extending/embedding:numargsif(!PyArg_ParseTuple(args, ":numargs"))
7extending/extending:setif (PyArg_ParseTuple(args, "O:set_callback", &temp)) {
8extending/extending:myfunctionPyArg_ParseTuple(args, "D:myfunction", &c);
9extending/newtypes:callif (!PyArg_ParseTuple(args, "sss:call", &arg1, &arg2, &arg3)) {
10faq/programming:reduceprint (lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+y,map(lambda y,
11faq/programming:reduceSx=Sx,Sy=Sy:reduce(lambda x,y:x+y,map(lambda x,xc=Ru,yc=yc,Ru=Ru,Ro=Ro,
12faq/programming:chr>=4.0) or 1+f(xc,yc,x*x-y*y+xc,2.0*x*y+yc,k-1,f):f(xc,yc,x,y,k,f):chr(
13faq/programming::for x in sequence[::-1]:
14howto/cporting:encodeif (!PyArg_ParseTuple(args, "O:encode_object", &myobj))
15howto/cporting:sayif (!PyArg_ParseTuple(args, "U:say_hello", &name))
16howto/curses:blackThey are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and
17howto/curses:blueThey are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and
18howto/curses:cyanThey are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and
19howto/curses:greenThey are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and
20howto/curses:magentaThey are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and
21howto/curses:redThey are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and
22howto/curses:white7:white.
23howto/curses:yellowThey are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and
24howto/logging:rootWARNING:root:Watch out!
25howto/logging:WatchWARNING:root:Watch out!
26howto/logging:rootDEBUG:root:This message should go to the log file
27howto/logging:rootINFO:root:So should this
28howto/logging:SoINFO:root:So should this
29howto/logging:rootWARNING:root:And this, too
30howto/logging:AndWARNING:root:And this, too
31howto/logging:rootINFO:root:Started
32howto/logging:StartedINFO:root:Started
33howto/logging:rootINFO:root:Doing something
34howto/logging:DoingINFO:root:Doing something
35howto/logging:rootINFO:root:Finished
36howto/logging:FinishedINFO:root:Finished
37howto/logging:rootWARNING:root:Look before you leap!
38howto/logging:LookWARNING:root:Look before you leap!
39howto/logging:ThisDEBUG:This message should appear on the console
40howto/logging:SoINFO:So should this
41howto/logging:AndWARNING:And this, too
42howto/logging:loggerseverity:logger name:message
43howto/logging:messageseverity:logger name:message
44howto/logging:ThisDEBUG:root:This message should go to the log file
45howto/pyporting::Programming Language :: Python :: 2
46howto/pyporting::Programming Language :: Python :: 3
47howto/regex::
48howto/regex:foo(?:foo)
49howto/urllib2:password"joe:password@example.com"
50library/audioop:ipos# factor = audioop.findfactor(in_test[ipos*2:ipos*2+len(out_test)],
51library/bisect:hiall(val >= x for val in a[i:hi])
52library/bisect:hiall(val > x for val in a[i:hi])
53library/cookie`!#$%&'*+-.^_`|~
54library/datetime:MM
55library/datetime:SS
56library/decimal:optionaltrailneg:optional trailing minus indicator
57library/difflib:ahia[alo:ahi]
58library/difflib:bhib[blo:bhi]
59library/difflib:i2
60library/difflib:j2
61library/difflib:i1
62library/dis:TOS
63library/dis`TOS = `TOS`
64library/doctest```factorial`` from the ``example`` module:
65library/doctest`The ``example`` module
66library/doctest`Using ``factorial``
67library/exceptions:errerr.object[err.start:err.end]
68library/functions:stepa[start:stop:step]
69library/functions:stopa[start:stop, i]
70library/functions:stopa[start:stop:step]
71library/hotshot:linenoncalls tottime percall cumtime percall filename:lineno(function)
72library/httplib:porthost:port
73library/imaplib:MM"DD-Mmm-YYYY HH:MM:SS
74library/imaplib:SS"DD-Mmm-YYYY HH:MM:SS
75library/itertools:stopelements from seq[start:stop:step]
76library/itertools:stepelements from seq[start:stop:step]
77library/linecache:syssys:x:3:3:sys:/dev:/bin/sh
78library/logging.handlers:porthost:port
79library/mmap:i2obj[i1:i2]
80library/multiprocessing:queue>>> QueueManager.register('get_queue', callable=lambda:queue)
81library/multiprocessing`>>> l._callmethod('__getitem__', (20,)) # equiv to `l[20]`
82library/multiprocessing`>>> l._callmethod('__getslice__', (2, 7)) # equiv to `l[2:7]`
83library/multiprocessing`# `BaseManager`.
84library/multiprocessing`# `Pool.imap()` (which will save on the amount of code needed anyway).
85library/multiprocessing`# A test file for the `multiprocessing` package
86library/multiprocessing`# A test of `multiprocessing.Pool` class
87library/multiprocessing`# Add more tasks using `put()`
88library/multiprocessing`# in the original order then consider using `Pool.map()` or
89library/multiprocessing`# Not sure if we should synchronize access to `socket.accept()` method by
90library/multiprocessing`# object. (We import `multiprocessing.reduction` to enable this pickling.)
91library/multiprocessing`# register the Foo class; make `f()` and `g()` accessible via proxy
92library/multiprocessing`# register the Foo class; make `g()` and `_h()` accessible via proxy
93library/multiprocessing`# register the generator function baz; use `GeneratorProxy` to make proxies
94library/optparse:lendel parser.rargs[:len(value)]
95library/os.path:fooc:foo
96library/pdb:linenofilename:lineno
97library/posix`CFLAGS="`getconf LFS_CFLAGS`" OPT="-g -O2 $CFLAGS"
98library/profile:linenoncalls tottime percall cumtime percall filename:lineno(function)
99library/profile:linenofilename:lineno(function)
100library/pyexpat:elem1<py:elem1 />
101library/pyexpat:pyxmlns:py = "http://www.python.org/ns/">
102library/re`!#$%&'*+-.^_`|~:
103library/re`[abcdefghijklmnopqrstuvwxyz0123456789\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\:]+
104library/smtplib:portmethod must support that as well as a regular host:port
105library/socket::'5aef:2b::8'
106library/sqlite3:memory
107library/sqlite3:whocur.execute("select * from people where name_last=:who and age=:age", {"who": who, "age": age})
108library/sqlite3:agecur.execute("select * from people where name_last=:who and age=:age", {"who": who, "age": age})
109library/ssl:MyOrganization Name (eg, company) [Internet Widgits Pty Ltd]:My Organization, Inc.
110library/ssl:MyOrganizational Unit Name (eg, section) []:My Group
111library/ssl:myserverCommon Name (eg, YOUR name) []:myserver.mygroup.myorganization.com
112library/ssl:MyStateState or Province Name (full name) [Some-State]:MyState
113library/ssl:opsEmail Address []:ops@myserver.mygroup.myorganization.com
114library/ssl:SomeLocality Name (eg, city) []:Some City
115library/ssl:USCountry Name (2 letter code) [AU]:US
116library/stdtypes:lens[len(s):len(s)]
117library/stdtypes:ends[start:end]
118library/string:ends[start:end]
119library/subprocess`output=`mycmd myarg`
120library/subprocess`output=`dmesg | grep hda`
121library/tarfile:compressionfilemode[:compression]
122library/tarfile:gz
123library/tarfile:bz2
124library/time:mm
125library/time:ss
126library/turtle::Example::
127library/urllib:port:port
128library/urllib2:password"joe:password@python.org"
129library/urllib2:closeConnection:close
130library/uuid:uuidurn:uuid:12345678-1234-5678-1234-567812345678
131library/xml.etree.elementtree:sometagprefix:sometag
132library/xml.etree.elementtree:fictional<actors xmlns:fictional="http://characters.example.com"
133library/xml.etree.elementtree:character<fictional:character>Lancelot</fictional:character>
134library/xml.etree.elementtree:character<fictional:character>Archie Leach</fictional:character>
135library/xml.etree.elementtree:character<fictional:character>Sir Robin</fictional:character>
136library/xml.etree.elementtree:character<fictional:character>Gunther</fictional:character>
137library/xml.etree.elementtree:character<fictional:character>Commander Clement</fictional:character>
138library/xml.etree.elementtree:actorfor actor in root.findall('real_person:actor', ns):
139library/xml.etree.elementtree:namename = actor.find('real_person:name', ns)
140library/xml.etree.elementtree:characterfor char in actor.findall('role:character', ns):
141library/xmlrpclib:passhttp://user:pass@host:port/path
142library/xmlrpclib:passuser:pass
143library/xmlrpclib:porthttp://user:pass@host:port/path
144license`THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
145license:zookomailto:zooko@zooko.com
146license`THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
147license`* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
148license`* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
149license```Software''), to deal in the Software without restriction, including
150license`THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
151reference/datamodel:stepa[i:j:step]
152reference/datamodel:max
153reference/expressions:indexx[index:index]
154reference/expressions``expressions...`
155reference/expressions350``
156reference/grammar`'`' testlist1 '`'
157reference/lexical_analysis:fileencoding# vim:fileencoding=<encoding-name>
158reference/lexical_analysis`, : . ` = ;
159tutorial/datastructures:valuekey:value pairs within the braces adds initial key:value pairs
160tutorial/datastructures:valueIt is also possible to delete a key:value
161tutorial/stdlib2:startfields = struct.unpack('<IIIHH', data[start:start+16])
162tutorial/stdlib2:startextra = data[start:start+extra_size]
163tutorial/stdlib2:startfilename = data[start:start+filenamesize]
164tutorial/stdlib2:configlogging.warning('Warning:config file %s not found', 'server.conf')
165tutorial/stdlib2:configWARNING:root:Warning:config file server.conf not found
166tutorial/stdlib2:CriticalCRITICAL:root:Critical error -- shutting down
167tutorial/stdlib2:ErrorERROR:root:Error occurred
168tutorial/stdlib2:rootCRITICAL:root:Critical error -- shutting down
169tutorial/stdlib2:rootERROR:root:Error occurred
170tutorial/stdlib2:rootWARNING:root:Warning:config file server.conf not found
171tutorial/stdlib2:WarningWARNING:root:Warning:config file server.conf not found
172using/cmdline:linefile:line: category: message
173using/cmdline:categoryaction:message:category:module:line
174using/cmdline:lineaction:message:category:module:line
175using/cmdline:messageaction:message:category:module:line
176using/cmdline:moduleaction:message:category:module:line
177using/cmdline:errorhandler:errorhandler
178using/unix:Packaginghttps://en.opensuse.org/Portal:Packaging
179whatsnew/2.0418:len
180whatsnew/2.3::
181whatsnew/2.3:config
182whatsnew/2.3:Critical
183whatsnew/2.3:Error
184whatsnew/2.3:Problem
185whatsnew/2.3:root
186whatsnew/2.3:Warning
187whatsnew/2.4::
188whatsnew/2.4:System
189whatsnew/2.5:memory:memory:
190whatsnew/2.5:step[start:stop:step]
191whatsnew/2.5:stop[start:stop:step]
192whatsnew/2.7:Sunday'2009:4:Sunday'
193whatsnew/2.7::export PYTHONWARNINGS=all,error:::Cookie:0
194whatsnew/2.7:Cookieexport PYTHONWARNINGS=all,error:::Cookie:0
195whatsnew/2.7::>>> urlparse.urlparse('http://[1080::8:800:200C:417A]/foo')
196whatsnew/2.7::ParseResult(scheme='http', netloc='[1080::8:800:200C:417A]',