Is pythonic version of scanf() or sscanf() planned?

MRAB python at mrabarnett.plus.com
Sat Oct 3 19:20:10 EDT 2009


ryniek90 wrote:
> Hi
> 
> I know that in python, we can do the same with regexps or *.split()*, 
> but thats longer and less practical method than *scanf()*. I also found 
> that ( http://code.activestate.com/recipes/502213/ ), but the code 
> doesn't looks so simple for beginners. So, whether it is or has been 
> planned the core Python implementation of *scanf()* ? (prefered as a 
> batteries included method)
> 
scanf() uses '%' format like that used for printing, but '%' format is
being replaced in Python by '{}' format, so shouldn't any possible
future scanf() use that instead? :-)



More information about the Python-list mailing list