User:Jorend/Python set usage: Difference between revisions

Jump to navigation Jump to search
Line 28: Line 28:
(On Mac OS X Lion, configure with <code>CC=gcc-apple-4.2 ./configure</code> instead. Apple’s LLVM-based gcc that ships with Lion can’t build Python.)
(On Mac OS X Lion, configure with <code>CC=gcc-apple-4.2 ./configure</code> instead. Apple’s LLVM-based gcc that ships with Lion can’t build Python.)


The script below was then run in the same directory. The script searches the <code>Lib</code> directory for Python files. It disregards unit tests, as they typically contain very unusual code. It parses each other file using the Python parser and finds each set-creation expression. The expression <code>set()</code>, which creates an empty set, is disregarded; the rest are classified as one of the following:
The script below was then run in the <code>Lib</code> directory. The script searches the <code>Lib</code> directory for Python files. It disregards unit tests, as they typically contain very unusual code. It parses each other file using the Python parser and finds each set-creation expression. The expression <code>set()</code>, which creates an empty set, is disregarded; the rest are classified as one of the following:


* A - statically known number of values (supporting variable arguments)
* A - statically known number of values (supporting variable arguments)
638

edits

Navigation menu