ITKSphinxExamples icon indicating copy to clipboard operation
ITKSphinxExamples copied to clipboard

Use idiomatic Python throughout the examples

Open thewtex opened this issue 4 years ago • 2 comments

To improve example readability and improve familiarity to Pythonistas, we should use idiomatic Python throughout the examples. In the past we had tried to keep the C++ and Python similar, but it is evident that this is less useful than idiomatic Python that people will use in practice.

This means:

  • Using snake_case instead of camelCase for variable names
  • Not using type declarations, unless required
  • Using the Pythonic functional interface to filters when possible
  • Not hardcoding types or dimensions when possible

thewtex avatar Feb 17 '21 20:02 thewtex

:+1: to this.

Using snake_case instead of camel_case for variable names

@thewtex Probably?

Using snake_case instead of camelCase for variable names

jhlegarreta avatar Feb 17 '21 21:02 jhlegarreta

Using snake_case instead of camelCase for variable names

Good catch -- corrected.

thewtex avatar Feb 18 '21 15:02 thewtex