jeffolsi10 <yirage2...@coalamails.com> added the comment:

I'd like also to point that there are few other cases:
https://stackoverflow.com/questions/11273282/whats-the-name-for-hyphen-separated-case

This is PascalCase: SomeSymbol
This is camelCase: someSymbol
This is snake_case: some_symbol

So a possible function could be:

convert_case(string, input_format, output_format)
for example:

convert_case(someSymbol, input_format='camelCase', output_format='snake_case')
output: some_symbol

It should be noted that you can not convert something without knowing what it 
is.
so something like : convert('helloworld','camelCase') can not be done because 
you don't know where one first word start and when one ends.

----------

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

Reply via email to