mirror of
				https://github.com/LonamiWebs/Telethon.git
				synced 2025-11-04 01:47:27 +03:00 
			
		
		
		
	Stop using TLObject.__repr__ to show the TL definition
This commit is contained in:
		
							parent
							
								
									aea95a398b
								
							
						
					
					
						commit
						2c5c674531
					
				| 
						 | 
					@ -352,11 +352,7 @@ class TLGenerator:
 | 
				
			||||||
                builder.writeln('pass')
 | 
					                builder.writeln('pass')
 | 
				
			||||||
        builder.end_block()
 | 
					        builder.end_block()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Write the __repr__(self) and __str__(self) functions
 | 
					        # Write the __str__(self) and stringify(self) functions
 | 
				
			||||||
        builder.writeln('def __repr__(self):')
 | 
					 | 
				
			||||||
        builder.writeln("return '{}'".format(repr(tlobject)))
 | 
					 | 
				
			||||||
        builder.end_block()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        builder.writeln('def __str__(self):')
 | 
					        builder.writeln('def __str__(self):')
 | 
				
			||||||
        builder.writeln('return TLObject.pretty_format(self)')
 | 
					        builder.writeln('return TLObject.pretty_format(self)')
 | 
				
			||||||
        builder.end_block()
 | 
					        builder.end_block()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user