Use __send__ method instead of send #72

Closed
alextk opened this Issue Aug 18, 2011 · 6 comments

Projects

None yet

3 participants

@alextk
alextk commented Aug 18, 2011

Because some classes can override send method (for example TextMagic::API uses send method to send the sms through gateway, which makes it impossible to mock).

I will submit pull request soon.

@dchelimsky
Member

You can override send too, can't you?

@alextk
alextk commented Aug 18, 2011

You're right,
but send method is a legitimate method to override to provide api with business logic meaning. Like in TextMagic, they override send method for SENDING sms messages.
It will be a really rare case if someone overrides __send__ method to provide some API for others.

@dchelimsky
Member

Fair enough. TIA for the pull request.

@alindeman
Collaborator

@alextk, any news on a pull request?

@alextk
alextk commented Jun 10, 2012

It's already in the code base since 2.7.0 version.
I think the issue can be closed.

@alextk alextk closed this Jun 10, 2012
@alindeman
Collaborator

Awesome, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment