Skip to content

rename create_filler() #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lorenzwalthert opened this issue Aug 18, 2017 · 2 comments
Closed

rename create_filler() #132

lorenzwalthert opened this issue Aug 18, 2017 · 2 comments

Comments

@lorenzwalthert
Copy link
Collaborator

I think this function name is a bit confusing and I would change it so somthing that reflects the purpose of the function better, like initialize_attributes() or something like that. I think this is important because people developing their own style guides will get in touch with this function, so it is not purely internal. Alternatively, we can also spit it up into multiple functions and give each a specific name like

  • initialize_multi_line
  • compute_space
  • compute_newline
  • initialize_ref_id
  • initialize_indent

Which may be more clear but calling 5 functions instead of 1 on every level of nesting might add too much overhead. @krlmlr What's your take on that?

@krlmlr
Copy link
Member

krlmlr commented Aug 18, 2017

We should keep exposing one function for initializing internal attributes with a clear name like initialize_attributes(), which calls the five functions you're suggesting. I wouldn't worry about performance unless we can measure it.

Is this function part of the public API?

@lorenzwalthert
Copy link
Collaborator Author

lorenzwalthert commented Aug 18, 2017

Ok, fine. No, it's not part of the public API but create_style_guide()has an argument filler, which stems from create_filler() and I think it's not very clear. So we would change both I suggest.

This was referenced Sep 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants