[Patches] [Patch #101215] extend 'import x as y' syntax to 'import x as y.z'

noreply@sourceforge.net noreply@sourceforge.net
Thu, 17 Aug 2000 22:25:38 -0700


Patch #101215 has been updated. 

Project: 
Category: core (C code)
Status: Open
Summary: extend 'import x as y' syntax to 'import x as y.z'

Follow-Ups:

Date: 2000-Aug-18 05:25
By: nowonder

Comment:
I've played a bit around with the new 'import x as y' syntax and found it would be useful to be able to assign to module/class members, too.

Example from BaseHTTPServer:
  import SOCKS; socket = SOCKS; del SOCKS
  from socket import getfqdn; socket.getfqdn = getfqdn; del getfqdn

could become:
  import SOCKS as socket # nothing new here
  from socket import getfqdn as socket.getfqdn # NEW!

Assigned to Thomas for review.
-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://sourceforge.net/patch/?func=detailpatch&patch_id=101215&group_id=5470