mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 03:44:55 +00:00 
			
		
		
		
	Add 'r' to docstrings to avoid expanded backslash escapes. (Ka-Ping Yee)
This commit is contained in:
		
							parent
							
								
									3e7b133c95
								
							
						
					
					
						commit
						7f91cf9a68
					
				
					 2 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
					@ -1,7 +1,8 @@
 | 
				
			||||||
"""Convert a NT pathname to a file URL and vice versa."""
 | 
					"""Convert a NT pathname to a file URL and vice versa."""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def url2pathname(url):
 | 
					def url2pathname(url):
 | 
				
			||||||
	""" Convert a URL to a DOS path...
 | 
						r"""Convert a URL to a DOS path.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		///C|/foo/bar/spam.foo
 | 
							///C|/foo/bar/spam.foo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			becomes
 | 
								becomes
 | 
				
			||||||
| 
						 | 
					@ -32,7 +33,8 @@ def url2pathname(url):
 | 
				
			||||||
	return path
 | 
						return path
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def pathname2url(p):
 | 
					def pathname2url(p):
 | 
				
			||||||
	""" Convert a DOS path name to a file url...
 | 
						r"""Convert a DOS path name to a file url.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		C:\foo\bar\spam.foo
 | 
							C:\foo\bar\spam.foo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			becomes
 | 
								becomes
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
#! /usr/bin/env python1.5
 | 
					#! /usr/bin/env python1.5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
"""Convert old ("regex") regular expressions to new syntax ("re").
 | 
					r"""Convert old ("regex") regular expressions to new syntax ("re").
 | 
				
			||||||
 | 
					
 | 
				
			||||||
When imported as a module, there are two functions, with their own
 | 
					When imported as a module, there are two functions, with their own
 | 
				
			||||||
strings:
 | 
					strings:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue