[Python-Dev] Python 3.0: can we make dbm's .keys() return an iterator?
As far as I can see, the specification of the dbm interface is the module docstring in dbm/__init__.py, which reads: """ [...] It has the following interface (key and data are strings): d[key] = data # store data at key (may override data at # existing key) data = d[key] # retrieve data at key (raise KeyError if no # such key) del d[key] # delete data stored at key (raises KeyError # if no such key) flag = key in d # true if the key exists list = d.keys() # return a list of all existing keys (slow!) """ Now I thought that in Python 3.0, keys(), values() and friends should return iterators. Can we change at least the specification of the dbm module? We could then later in 3.1 change the implementations to return iterators instead of lists, too. I stumbled upon it cos I'm trying to help Skip with the SQLite-based implementation. -- Gerhard ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] HTTPS read-only SVN access is denied?
2008/9/7, "Martin v. Löwis" <[EMAIL PROTECTED]>: > Not necessarily - as you say, it's undocumented (and will remain so); > in any case, I have now granted anonymous read access to that > repository, through https. > Thnx a lot... Formerly I could not access anything because of the aforementioned authentication issue... Now public access is ok but... I have recently tried to check out the latest versions of the PEPs and I still can't do it. Something like this is what happens... $ svn co https://svn.python.org/projects/peps/trunk/ . Apep-0100.txt Apep-0102.txt ... # Many other files "added" Apep-0297.txt Apep-0299.txt U . Fetching external item into 'docutils' svn: Can't connect to host 'svn.berlios.de': A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. -- Please I need some help so as to finally check out all the PEPs at once. Is this a consequence of my systems settings (SVN, etc...)? Otherwise, why is this "lovely" message shown? Please... how can I overcome this situation? Thnx. -- Regards, Olemis. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] HTTPS read-only SVN access is denied?
Olemis Lang wrote: Fetching external item into 'docutils' svn: Can't connect to host 'svn.berlios.de': A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. > Please I need some help so as to finally check out all the PEPs at > once. I suspect you already have all the PEP:s; the checkout command gets stuck when trying to fetch some additional software from an external server. try adding the --ignore-externals option to the checkout command, and see if this gets you any further. then check if you can reach http://svn.berlios.de via your browser, or if some firewall rule gets in the way. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] HTTPS read-only SVN access is denied?
> then check if you can reach http://svn.berlios.de via your browser, or > if some firewall rule gets in the way. He probably can, but the firewall still gets in the way when he tries to do the svn checkout - his firewall is incapable of forwarding OPTIONS and other methods used by subversion. Hence he needs to use https, as the firewall then puts through all traffic unmodified, thanks to the CONNECT method. So there will be no chance that he can checkout the berlios externals directly, as their URL is defined in the Python repository (and will remain at http, for the sake of most of us with sane networking environments) Regards, Martin ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 3.0: can we make dbm's .keys() return an iterator?
On Thu, Sep 11, 2008 at 2:40 AM, Gerhard Häring <[EMAIL PROTECTED]> wrote: > As far as I can see, the specification of the dbm interface is the module > docstring in dbm/__init__.py, which reads: > > """ > [...] > It has the following interface (key and data are strings): > >d[key] = data # store data at key (may override data at ># existing key) >data = d[key] # retrieve data at key (raise KeyError if no ># such key) >del d[key] # delete data stored at key (raises KeyError ># if no such key) >flag = key in d # true if the key exists >list = d.keys() # return a list of all existing keys (slow!) > """ > > Now I thought that in Python 3.0, keys(), values() and friends should return > iterators. Can we change at least the specification of the dbm module? We > could then later in 3.1 change the implementations to return iterators > instead of lists, too. > > I stumbled upon it cos I'm trying to help Skip with the SQLite-based > implementation. If it's to be following a variant of the dictionary API, the object should return a view object: http://docs.python.org/dev/3.0/library/stdtypes.html#dict . I've updated my version of the library in the tracker, which includes generic Keys, Values, and Items classes that implement the view interface. - Josiah ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
