New submission from nickeubank:

As a social scientists trying to help other social scientists move from 
language like R, Stata, and Matlab into Python, one of the behaviors I've found 
unnecessarily difficult to explain is the "file.open()/file.close()" idiom (or, 
alternatively, context managers). In normal operating systems, and many high 
level languages, saving is a one-step operation. 

I understand there are situations where an open file handle is useful, but it 
seems a simple `to_file` method on strings (essentially wrapping a 
context-manager) would be really nice, as it would save users from learning 
this idiom. 

Any chance it's feasible? Sadly, I have no real C skills so can't implement 
myself. :(

----------
components: IO
messages: 262141
nosy: nickeubank
priority: normal
severity: normal
status: open
title: Feature request: string method `to_file`
type: enhancement

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26605>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to