Skip to content

Proposing changes to alex.utils & cleaning up. - #133

Open
ticcky wants to merge 1 commit into
masterfrom
cleanup
Open

Proposing changes to alex.utils & cleaning up.#133
ticcky wants to merge 1 commit into
masterfrom
cleanup

Conversation

@ticcky

@ticcky ticcky commented Mar 12, 2015

Copy link
Copy Markdown
Contributor

I went through alex.utils, deleted some obviously unused code and marked some changes that I would like to make to improve Alex's codebase. Please let me know what you think of them.

Please do NOT merge this pull request. It is only proposal for changes.

Thanks!

@landscape-bot

Copy link
Copy Markdown

Code Health
Repository health increased by 0.01% when pulling dbe2e14 on cleanup into 06a0695 on master.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather keep the old name – I think it describes the function sufficiently and the new one makes lines too long ;-).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that I had to study the code of the method to understand what is it doing - it was not apparent to me on the first sight it is working on a list. So how about list_remove_dups_stable ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I've just realized that I wrote this function... maybe that's why it seemed so clear to me 😄 . So I'm probably not the right one to judge... remove_list_dups_stable would sound slightly better to me, but i'm OK with both.

@oplatek

oplatek commented Mar 13, 2015

Copy link
Copy Markdown
Member

Proposed new change:
Replace our Counter class with stdlib collections.Counter
at file:
https://github.com/UFAL-DSG/alex/blob/cleanup/alex/utils/cache.py#L23

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

Successfully merging this pull request may close these issues.

4 participants