mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Jacob Hallen cornered me here at EuroPython and got me to look at
patch: [ 750008 ] 'compiler' module bug with 'import foo.bar as baz' which I'm now checking in. after import foo.bar as baz, baz would refer to foo.
This commit is contained in:
		
							parent
							
								
									f69d9f6818
								
							
						
					
					
						commit
						896e5164bb
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		|  | @ -761,7 +761,11 @@ def visitImport(self, node): | ||||||
|                 self.emit('LOAD_CONST', None) |                 self.emit('LOAD_CONST', None) | ||||||
|             self.emit('IMPORT_NAME', name) |             self.emit('IMPORT_NAME', name) | ||||||
|             mod = name.split(".")[0] |             mod = name.split(".")[0] | ||||||
|             self.storeName(alias or mod) |             if alias: | ||||||
|  |                 self._resolveDots(name) | ||||||
|  |                 self.storeName(alias) | ||||||
|  |             else: | ||||||
|  |                 self.storeName(mod) | ||||||
| 
 | 
 | ||||||
|     def visitFrom(self, node): |     def visitFrom(self, node): | ||||||
|         self.set_lineno(node) |         self.set_lineno(node) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Michael W. Hudson
						Michael W. Hudson