[issue40437] add string.snake function

2020-04-30 Thread jeffolsi10
jeffolsi10 added the comment: I can respect that. So you may close this request. -- ___ Python tracker <https://bugs.python.org/issue40437> ___ ___ Python-bug

[issue40437] add string.snake function

2020-04-29 Thread jeffolsi10
jeffolsi10 added the comment: RĂ©mi Lapeyre not all of them. I can give list of many examples where snake case is needed. But the question is: Are we discussing if snake case is even needed or are we discussing if this should be in python core. Those are two totally different things. 1. The

[issue40437] add string.snake function

2020-04-29 Thread jeffolsi10
jeffolsi10 added the comment: I feel this should be in core. I still don't understand why capitalize is supported and others do not. snake case is very well defined. Issues like tabs and spaces are not relevant. can you show example that you have that dilemma? To be honest I don't

[issue40437] add string.snake function

2020-04-29 Thread jeffolsi10
jeffolsi10 added the comment: it can. This is why I'm asking this. Consider APIs that return list of names in camelCase. You must convert the keys to snakeCase to create tables from it as it's bad practice to have capitalised letters in columns or table names. Further more, consid

[issue40437] add string.snake function

2020-04-29 Thread jeffolsi10
jeffolsi10 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

[issue40437] add string.snake function

2020-04-29 Thread jeffolsi10
jeffolsi10 added the comment: snake case has very specific definition : https://en.wikipedia.org/wiki/Snake_case I expect the function to implement the definition and not something that I or someone else desire. As for your question about '$' char I could ask the same thing for l

[issue40437] add string.snake function

2020-04-29 Thread jeffolsi10
New submission from jeffolsi10 : Like we have: capitalize swapcase and others we should also have snake case Which converts: before: First Name, Last Name, Employee Status, Subject after: first_name, last_name, employee_status, subject This is very useful when working with titles of columns