unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: meskio <meskio@sindominio.net>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: [PATCH] python: add bindings for notmuch_message_get_propert(y/ies)
Date: Fri, 27 Apr 2018 21:12:13 +0200	[thread overview]
Message-ID: <152485633339.1600.12264382495006409318@localhost> (raw)
In-Reply-To: <87y3lt8mfc.fsf@tethera.net>

[-- Attachment #1: Type: text/plain, Size: 1862 bytes --]

Quoting David Bremner (2017-12-23 16:59:51)
> Ruben Pollan <meskio@sindominio.net> writes:
> > +
> > +    def get_properties(self, prop="", exact=False):
> 
> As far as I understand, you also need to update docs/source/message.rst
> so that your new methods are documented in the sphinx docs.
> 
> > +        """ Get the properties for *message*, returning
> > +        notmuch_message_properties_t object which can be used to iterate
> > +        over all properties.
> 
> This seeems to be wrong (or at last confusing) for the python bindings.
> 
> > +
> > +        :param prop: The name of the property to get. Otherwise it will return
> > +                     the full list of properties of the message.
> > +        :param exact: if True, require exact match with key. Otherwise
> > +                      treat as prefix.
> > +        :returns: A dictionary with the property names and values {key: value}
> > +        :raises: :exc:`NotInitializedError` if message has not been
> > +                 initialized
> > +        """
> > +        if not self._msg:
> > +            raise NotInitializedError()
> > +
> > +        properties_dict = {}
> > +        properties = Message._get_properties(self._msg, prop, exact)
> 
> Now that the database.get_configs method is merged, I'd prefer to be consistent
> with that, and define a generator that yields key/value pairs. It's easy
> enough for someone to use a dictionary comprehension to get a dict from
> that if they want it.  Sorry to be making extra work for you.

Good to me, I'm sending an update with all this fixed.

Sorry for letting it hung for so long.

-- 
meskio | http://meskio.net/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 My contact info: http://meskio.net/crypto.txt
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Nos vamos a Croatan.

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEs7M6f/ZpXzXMAQR+Urj1rJei2oYFAlrjdggACgkQUrj1rJei
2oY0lg/9H899SCbZQ++ZAPfWVqlu52i1ZdT4t1y+oaz0ILgeLGvylGM5es+j2uKX
7fJ+69YpkUiEvNDHvGgBZFr6tyGArACcq5fo/ZDNWMIQDR9rFQoFGcwnMyyDB0KF
ASn5i0TyUDTe0/JwAV7m5EEergyMwqnHYVRTDyKwff2ajKbwM7UyUldRTO4nl/3y
B3nZs3R3NFmNaeLPhJqJO+ED8gxKGcia/yS4vk1D7NlpJjUz1mz/+MkfcyKRxArx
HZBs2HNMoYA7l4tc6b2bdh9GXiy7yEV5mWnept7WBC8W/ywxv8U5d9cZ4FbM4OBK
jAWnh//tsba1OhA79XVskzw3RFUllR/E674iF7KK3IbM6CwpKX5ISc1SbaYz+h8W
IUxboHYAR1tynu3OhLkZO58CKsT4qFZDM7vFszBVcgmaltaMDcv54aAfVysC0nll
fxbyDPvBSCnprD6C4jGP4/3W04mLgt0esUpUPWk/52hUYLVpN7e4KyhH1POLLF4l
BpG/n1MiLshCKoChjiW+OwSgkgSSkAvWQcCKa8TY7el0NdlCdwZob9/Sq7o2skGL
QKm1JyqEKHCU4j77CmRARVvVsSucbthQJQJofcR5R0AYW5tLXjdXVn5CHnTXcl66
jVmSZ7CO87hQ+roB082pZqkct9fGWoYs3S0T0nCa691or9OhP8U=
=WebJ
-----END PGP SIGNATURE-----

  reply	other threads:[~2018-04-27 19:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15 22:29 [PATCH] python: add bindings for notmuch_message_get_property Ruben Pollan
2017-11-15 22:48 ` meskio
2017-11-17  9:03 ` Daniel Kahn Gillmor
2017-11-28 22:46   ` [PATCH] python: add bindings for notmuch_message_get_propert(y/ies) Ruben Pollan
2017-11-28 22:51     ` meskio
2017-11-29  1:57     ` Daniel Kahn Gillmor
2017-11-29  8:02       ` meskio
2017-11-29  8:03         ` Ruben Pollan
2017-12-23 15:59           ` David Bremner
2018-04-27 19:12             ` meskio [this message]
2018-04-27 19:15               ` Ruben Pollan
2018-05-01 13:06                 ` David Bremner
2018-05-01 15:24                   ` meskio
2018-05-01 15:28                     ` Ruben Pollan
2018-05-02  0:08                       ` David Bremner
2018-05-02 17:00                         ` meskio
2018-05-02 17:01                           ` Ruben Pollan
2018-05-02 23:50                             ` David Bremner
2017-11-29 21:40       ` Floris Bruynooghe
2017-11-30 13:44         ` David Bremner
2017-11-30 14:19           ` Daniel Kahn Gillmor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=152485633339.1600.12264382495006409318@localhost \
    --to=meskio@sindominio.net \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).