Pop modifies the original.
I think Doug means a method that takes in as parameter the dictionary and returns that same modified dictionary. The method using pop.

From: Arash Ghoreyshi [mailto:notifications@github.com]
Sent: Wednesday, June 05, 2013 2:43 PM
To: cloudkeep/python-barbicanclient
Cc: Bhandaru, Malini K
Subject: Re: [python-barbicanclient] Add logging and an initial test file (#5)


In barbicanclient/client.py:

>          if expiration is not None:

>              secret_dict['expiration'] = parse_isotime(expiration)

> +        for k in secret_dict.keys():

Doug, with that approach we'd have _remove_empty_keys() return the new dictionary instead of modifying the old one, right?

—
Reply to this email directly or view it on GitHub<https://github.com/cloudkeep/python-barbicanclient/pull/5/files#r4556706>.