[PATCH] python/thread: always return a string in get_subject/authors

2011-05-10 Thread Sebastian Spaeth
On Mon, 09 May 2011 09:20:41 -0300, David Bremner wrote: > On Mon, 9 May 2011 09:06:34 +0200, Anton Khirnov > wrote: > > Now None is returned when those don't exist, which is inconvenient to > > deal with. > > I'm not using the python bindings, but from a philosophical point of > view, this

[PATCH] python/thread: always return a string in get_subject/authors

2011-05-09 Thread Daniel Kahn Gillmor
On 05/09/2011 09:00 PM, Sebastian Spaeth wrote: > On Mon, 09 May 2011 09:20:41 -0300, David Bremner > wrote: >> On Mon, 9 May 2011 09:06:34 +0200, Anton Khirnov >> wrote: >>> Now None is returned when those don't exist, which is inconvenient to >>> deal with. >> >> I'm not using the python

[PATCH] python/thread: always return a string in get_subject/authors

2011-05-09 Thread Anton Khirnov
On Mon, 09 May 2011 09:20:41 -0300, David Bremner wrote: > On Mon, 9 May 2011 09:06:34 +0200, Anton Khirnov > wrote: > > Now None is returned when those don't exist, which is inconvenient to > > deal with. > > I'm not using the python bindings, but from a philosophical point of > view, this

[PATCH] python/thread: always return a string in get_subject/authors

2011-05-09 Thread Jesse Rosenthal
On Mon, 09 May 2011 11:23:16 -0400, Jesse Rosenthal wrote: > The RFC says yes on the author, no on the subject. The only things > guaranteed are "From:" and originating timestamp. So I'm not sure why > subject should be guaranteed a string result and not, say, "Cc." Apologies -- I realize now

[PATCH] python/thread: always return a string in get_subject/authors

2011-05-09 Thread Jesse Rosenthal
On Mon, 09 May 2011 17:13:10 +0200, Anton Khirnov wrote: > But those aren't message headers, those are thread properties. And I'd > argue that a thread always has authors and a subject (possibly empty). The RFC says yes on the author, no on the subject. The only things guaranteed are "From:" and

[PATCH] python/thread: always return a string in get_subject/authors

2011-05-09 Thread David Bremner
On Mon, 9 May 2011 09:06:34 +0200, Anton Khirnov wrote: > Now None is returned when those don't exist, which is inconvenient to > deal with. I'm not using the python bindings, but from a philosophical point of view, this change makes me a bit uncomfortable since it apparently merges two cases

[PATCH] python/thread: always return a string in get_subject/authors

2011-05-09 Thread Anton Khirnov
Now None is returned when those don't exist, which is inconvenient to deal with. --- bindings/python/notmuch/thread.py |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bindings/python/notmuch/thread.py b/bindings/python/notmuch/thread.py index eebd6cb..cf26957 100644

[PATCH] python/thread: always return a string in get_subject/authors

2011-05-09 Thread servilio
On 9 May 2011 08:20, David Bremner wrote: > On Mon, ?9 May 2011 09:06:34 +0200, Anton Khirnov > wrote: >> Now None is returned when those don't exist, which is inconvenient to >> deal with. > > I'm not using the python bindings, but from a philosophical point of > view, this change makes me a

[PATCH] python/thread: always return a string in get_subject/authors

2011-05-09 Thread Austin Clements
Your commit message is inconsistent with your change; is your intent to return None or the empty string? Also, could you modify your commit message to say what "those" are? On May 9, 2011 3:06 AM, "Anton Khirnov" wrote: -- next part -- An HTML attachment was scrubbed...

[PATCH] python/thread: always return a string in get_subject/authors

2011-05-09 Thread Anton Khirnov
Now None is returned when those don't exist, which is inconvenient to deal with. --- bindings/python/notmuch/thread.py |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bindings/python/notmuch/thread.py b/bindings/python/notmuch/thread.py index eebd6cb..cf26957 100644

Re: [PATCH] python/thread: always return a string in get_subject/authors

2011-05-09 Thread Austin Clements
Your commit message is inconsistent with your change; is your intent to return None or the empty string? Also, could you modify your commit message to say what those are? On May 9, 2011 3:06 AM, Anton Khirnov an...@khirnov.net wrote: ___ notmuch mailing

Re: [PATCH] python/thread: always return a string in get_subject/authors

2011-05-09 Thread David Bremner
On Mon, 9 May 2011 09:06:34 +0200, Anton Khirnov an...@khirnov.net wrote: Now None is returned when those don't exist, which is inconvenient to deal with. I'm not using the python bindings, but from a philosophical point of view, this change makes me a bit uncomfortable since it apparently

Re: [PATCH] python/thread: always return a string in get_subject/authors

2011-05-09 Thread servilio
On 9 May 2011 08:20, David Bremner da...@tethera.net wrote: On Mon,  9 May 2011 09:06:34 +0200, Anton Khirnov an...@khirnov.net wrote: Now None is returned when those don't exist, which is inconvenient to deal with. I'm not using the python bindings, but from a philosophical point of view,

Re: [PATCH] python/thread: always return a string in get_subject/authors

2011-05-09 Thread Anton Khirnov
On Mon, 09 May 2011 09:20:41 -0300, David Bremner da...@tethera.net wrote: On Mon, 9 May 2011 09:06:34 +0200, Anton Khirnov an...@khirnov.net wrote: Now None is returned when those don't exist, which is inconvenient to deal with. I'm not using the python bindings, but from a philosophical

Re: [PATCH] python/thread: always return a string in get_subject/authors

2011-05-09 Thread Jesse Rosenthal
On Mon, 09 May 2011 17:13:10 +0200, Anton Khirnov an...@khirnov.net wrote: But those aren't message headers, those are thread properties. And I'd argue that a thread always has authors and a subject (possibly empty). The RFC says yes on the author, no on the subject. The only things guaranteed

Re: [PATCH] python/thread: always return a string in get_subject/authors

2011-05-09 Thread Jesse Rosenthal
On Mon, 09 May 2011 11:23:16 -0400, Jesse Rosenthal jrosent...@jhu.edu wrote: The RFC says yes on the author, no on the subject. The only things guaranteed are From: and originating timestamp. So I'm not sure why subject should be guaranteed a string result and not, say, Cc. Apologies -- I

Re: [PATCH] python/thread: always return a string in get_subject/authors

2011-05-09 Thread Sebastian Spaeth
On Mon, 09 May 2011 09:20:41 -0300, David Bremner da...@tethera.net wrote: On Mon, 9 May 2011 09:06:34 +0200, Anton Khirnov an...@khirnov.net wrote: Now None is returned when those don't exist, which is inconvenient to deal with. I'm not using the python bindings, but from a philosophical

Re: [PATCH] python/thread: always return a string in get_subject/authors

2011-05-09 Thread Daniel Kahn Gillmor
On 05/09/2011 09:00 PM, Sebastian Spaeth wrote: On Mon, 09 May 2011 09:20:41 -0300, David Bremner da...@tethera.net wrote: On Mon, 9 May 2011 09:06:34 +0200, Anton Khirnov an...@khirnov.net wrote: Now None is returned when those don't exist, which is inconvenient to deal with. I'm not using