andrew-d / andrew-d/Hoboken

Datastructure cleanup

Aberta
#14 4 comentários 0 reações 0 responsáveis Ver no GitHub
cleanup
Linguagem predominante
Python
Estrelas
5
Forks
0
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

I'm currently not happy with some of the choices made in hoboken/objects/datastructures.py. This issue is a general list of things that I'd like to re-visit or fix.
- Remove ReturnTranslatingMultiDict
- See if I can remove "**keytrans**" and "**valtrans**" from MultiDict (kinda hack-ish)
- Related to this, the only time that this is used currently is in the cookies mixin, to allow indexing with either bytes or str. Might be worth creating a dedicated class, like "IndifferentMultiDict", or something, that handles just this case.
- CallbackMultiDict currently has some tests xfailed for functions that call on_change multiple times.
- Is this even a problem?
- If so, we probably need to move the functionality into MultiDict, instead of re-implementing the various functions in CallbackMultiDict.
- Or, implement a MutableMapping-derived class that delegates to a MultiDict internally, similar to how we handle CallbackList/CallbackDict. Only downside: it won't actually be a subclass of MultiDict, which means that iter_multi_items will probably misbehave. Could get around this with an ABC, but that seems like overkill.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.