mirror of
https://github.com/python/cpython.git
synced 2025-09-18 06:30:38 +00:00
revert r69777 since all the experts agree that extra import lines distract from the code
This commit is contained in:
parent
5149742e8b
commit
a7b55a33f8
31 changed files with 42 additions and 96 deletions
|
@ -267,8 +267,7 @@ sequence with comparable semantics, for example, yet many people write their own
|
|||
:func:`max`/:func:`min`. Another highly useful function is :func:`reduce`. A
|
||||
classical use of :func:`reduce` is something like ::
|
||||
|
||||
import operator
|
||||
import sys
|
||||
import sys, operator
|
||||
nums = map(float, sys.argv[1:])
|
||||
print reduce(operator.add, nums)/len(nums)
|
||||
|
||||
|
|
|
@ -99,8 +99,7 @@ simple CGI program::
|
|||
# -*- coding: UTF-8 -*-
|
||||
|
||||
# enable debugging
|
||||
import cgitb
|
||||
cgitb.enable()
|
||||
import cgitb; cgitb.enable()
|
||||
|
||||
print "Content-Type: text/plain;charset=utf-8"
|
||||
print
|
||||
|
@ -280,9 +279,7 @@ following WSGI-application::
|
|||
# -*- coding: UTF-8 -*-
|
||||
|
||||
from cgi import escape
|
||||
import os
|
||||
import sys
|
||||
|
||||
import sys, os
|
||||
from flup.server.fcgi import WSGIServer
|
||||
|
||||
def app(environ, start_response):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue