python-lastfm/docs/lastfm.objectcache-pysrc.html

185 lines
27 KiB
HTML

<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>lastfm.objectcache</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="lastfm-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/python-lastfm/">python-lastfm</a></th>
</tr></table></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="lastfm-module.html">Package&nbsp;lastfm</a> ::
Module&nbsp;objectcache
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="lastfm.objectcache-pysrc.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<h1 class="epydoc">Source Code for <a href="lastfm.objectcache-module.html" onclick="show_private();">Module lastfm.objectcache</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-name">__author__</tt> <tt class="py-op">=</tt> <tt class="py-docstring">"Abhinav Sarkar &lt;abhinav@abhinavsarkar.net&gt;"</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-name">__version__</tt> <tt class="py-op">=</tt> <tt class="py-string">"0.2"</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-name">__license__</tt> <tt class="py-op">=</tt> <tt class="py-string">"GNU Lesser General Public License"</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Package lastfm=lastfm-module.html"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-0', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Module lastfm.album=lastfm.album-module.html,Variable lastfm.track.Track.album=lastfm.track.Track-class.html#album"><a title="lastfm.album
lastfm.track.Track.album" class="py-name" href="#" onclick="return doclink('link-1', 'album', 'link-1');">album</a></tt> <tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Class lastfm.album.Album=lastfm.album.Album-class.html"><a title="lastfm.album.Album" class="py-name" href="#" onclick="return doclink('link-2', 'Album', 'link-2');">Album</a></tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-3" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-3', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Variable lastfm.album.Album.artist=lastfm.album.Album-class.html#artist,Module lastfm.artist=lastfm.artist-module.html,Variable lastfm.track.Track.artist=lastfm.track.Track-class.html#artist"><a title="lastfm.album.Album.artist
lastfm.artist
lastfm.track.Track.artist" class="py-name" href="#" onclick="return doclink('link-4', 'artist', 'link-4');">artist</a></tt> <tt class="py-keyword">import</tt> <tt id="link-5" class="py-name" targets="Class lastfm.artist.Artist=lastfm.artist.Artist-class.html"><a title="lastfm.artist.Artist" class="py-name" href="#" onclick="return doclink('link-5', 'Artist', 'link-5');">Artist</a></tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-6" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-6', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Package lastfm.mixins=lastfm.mixins-module.html"><a title="lastfm.mixins" class="py-name" href="#" onclick="return doclink('link-7', 'mixins', 'link-7');">mixins</a></tt> <tt class="py-keyword">import</tt> <tt id="link-8" class="py-name" targets="Class lastfm.mixins.cacheable.Cacheable=lastfm.mixins.cacheable.Cacheable-class.html"><a title="lastfm.mixins.cacheable.Cacheable" class="py-name" href="#" onclick="return doclink('link-8', 'Cacheable', 'link-8');">Cacheable</a></tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-9" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-9', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-10" class="py-name" targets="Module lastfm.error=lastfm.error-module.html"><a title="lastfm.error" class="py-name" href="#" onclick="return doclink('link-10', 'error', 'link-10');">error</a></tt> <tt class="py-keyword">import</tt> <tt id="link-11" class="py-name" targets="Class lastfm.error.InvalidParametersError=lastfm.error.InvalidParametersError-class.html"><a title="lastfm.error.InvalidParametersError" class="py-name" href="#" onclick="return doclink('link-11', 'InvalidParametersError', 'link-11');">InvalidParametersError</a></tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-12" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-12', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Module lastfm.event=lastfm.event-module.html"><a title="lastfm.event" class="py-name" href="#" onclick="return doclink('link-13', 'event', 'link-13');">event</a></tt> <tt class="py-keyword">import</tt> <tt id="link-14" class="py-name" targets="Class lastfm.event.Event=lastfm.event.Event-class.html"><a title="lastfm.event.Event" class="py-name" href="#" onclick="return doclink('link-14', 'Event', 'link-14');">Event</a></tt> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-15" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-15', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-16" class="py-name" targets="Module lastfm.geo=lastfm.geo-module.html"><a title="lastfm.geo" class="py-name" href="#" onclick="return doclink('link-16', 'geo', 'link-16');">geo</a></tt> <tt class="py-keyword">import</tt> <tt id="link-17" class="py-name" targets="Class lastfm.geo.Location=lastfm.geo.Location-class.html"><a title="lastfm.geo.Location" class="py-name" href="#" onclick="return doclink('link-17', 'Location', 'link-17');">Location</a></tt><tt class="py-op">,</tt> <tt id="link-18" class="py-name" targets="Class lastfm.geo.Country=lastfm.geo.Country-class.html"><a title="lastfm.geo.Country" class="py-name" href="#" onclick="return doclink('link-18', 'Country', 'link-18');">Country</a></tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-19" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-19', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-20" class="py-name" targets="Module lastfm.group=lastfm.group-module.html"><a title="lastfm.group" class="py-name" href="#" onclick="return doclink('link-20', 'group', 'link-20');">group</a></tt> <tt class="py-keyword">import</tt> <tt id="link-21" class="py-name" targets="Class lastfm.group.Group=lastfm.group.Group-class.html"><a title="lastfm.group.Group" class="py-name" href="#" onclick="return doclink('link-21', 'Group', 'link-21');">Group</a></tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-22" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-22', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-23" class="py-name" targets="Variable lastfm.album.Album.playlist=lastfm.album.Album-class.html#playlist,Module lastfm.playlist=lastfm.playlist-module.html,Variable lastfm.tag.Tag.playlist=lastfm.tag.Tag-class.html#playlist"><a title="lastfm.album.Album.playlist
lastfm.playlist
lastfm.tag.Tag.playlist" class="py-name" href="#" onclick="return doclink('link-23', 'playlist', 'link-23');">playlist</a></tt> <tt class="py-keyword">import</tt> <tt id="link-24" class="py-name" targets="Class lastfm.playlist.Playlist=lastfm.playlist.Playlist-class.html,Class lastfm.user.User.Playlist=lastfm.user.User.Playlist-class.html"><a title="lastfm.playlist.Playlist
lastfm.user.User.Playlist" class="py-name" href="#" onclick="return doclink('link-24', 'Playlist', 'link-24');">Playlist</a></tt> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-25" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-25', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-26" class="py-name" targets="Variable lastfm.event.Event.tag=lastfm.event.Event-class.html#tag,Module lastfm.tag=lastfm.tag-module.html"><a title="lastfm.event.Event.tag
lastfm.tag" class="py-name" href="#" onclick="return doclink('link-26', 'tag', 'link-26');">tag</a></tt> <tt class="py-keyword">import</tt> <tt id="link-27" class="py-name" targets="Class lastfm.tag.Tag=lastfm.tag.Tag-class.html"><a title="lastfm.tag.Tag" class="py-name" href="#" onclick="return doclink('link-27', 'Tag', 'link-27');">Tag</a></tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-28" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-28', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-29" class="py-name" targets="Module lastfm.track=lastfm.track-module.html"><a title="lastfm.track" class="py-name" href="#" onclick="return doclink('link-29', 'track', 'link-29');">track</a></tt> <tt class="py-keyword">import</tt> <tt id="link-30" class="py-name" targets="Class lastfm.track.Track=lastfm.track.Track-class.html"><a title="lastfm.track.Track" class="py-name" href="#" onclick="return doclink('link-30', 'Track', 'link-30');">Track</a></tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-31" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-31', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-32" class="py-name" targets="Module lastfm.user=lastfm.user-module.html,Variable lastfm.user.User.Library.user=lastfm.user.User.Library-class.html#user,Variable lastfm.user.User.Playlist.user=lastfm.user.User.Playlist-class.html#user"><a title="lastfm.user
lastfm.user.User.Library.user
lastfm.user.User.Playlist.user" class="py-name" href="#" onclick="return doclink('link-32', 'user', 'link-32');">user</a></tt> <tt class="py-keyword">import</tt> <tt id="link-33" class="py-name" targets="Class lastfm.user.User=lastfm.user.User-class.html"><a title="lastfm.user.User" class="py-name" href="#" onclick="return doclink('link-33', 'User', 'link-33');">User</a></tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-34" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-34', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-35" class="py-name" targets="Variable lastfm.event.Event.venue=lastfm.event.Event-class.html#venue,Module lastfm.venue=lastfm.venue-module.html"><a title="lastfm.event.Event.venue
lastfm.venue" class="py-name" href="#" onclick="return doclink('link-35', 'venue', 'link-35');">venue</a></tt> <tt class="py-keyword">import</tt> <tt id="link-36" class="py-name" targets="Class lastfm.venue.Venue=lastfm.venue.Venue-class.html"><a title="lastfm.venue.Venue" class="py-name" href="#" onclick="return doclink('link-36', 'Venue', 'link-36');">Venue</a></tt> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-37" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-37', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-38" class="py-name" targets="Module lastfm.weeklychart=lastfm.weeklychart-module.html"><a title="lastfm.weeklychart" class="py-name" href="#" onclick="return doclink('link-38', 'weeklychart', 'link-38');">weeklychart</a></tt> <tt class="py-keyword">import</tt> <tt id="link-39" class="py-name" targets="Class lastfm.weeklychart.WeeklyAlbumChart=lastfm.weeklychart.WeeklyAlbumChart-class.html"><a title="lastfm.weeklychart.WeeklyAlbumChart" class="py-name" href="#" onclick="return doclink('link-39', 'WeeklyAlbumChart', 'link-39');">WeeklyAlbumChart</a></tt><tt class="py-op">,</tt> <tt id="link-40" class="py-name" targets="Class lastfm.weeklychart.WeeklyArtistChart=lastfm.weeklychart.WeeklyArtistChart-class.html"><a title="lastfm.weeklychart.WeeklyArtistChart" class="py-name" href="#" onclick="return doclink('link-40', 'WeeklyArtistChart', 'link-40');">WeeklyArtistChart</a></tt><tt class="py-op">,</tt> <tt id="link-41" class="py-name" targets="Class lastfm.weeklychart.WeeklyTrackChart=lastfm.weeklychart.WeeklyTrackChart-class.html"><a title="lastfm.weeklychart.WeeklyTrackChart" class="py-name" href="#" onclick="return doclink('link-41', 'WeeklyTrackChart', 'link-41');">WeeklyTrackChart</a></tt> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"> </tt>
<a name="ObjectCache"></a><div id="ObjectCache-def"><a name="L21"></a><tt class="py-lineno">21</tt> <a class="py-toggle" href="#" id="ObjectCache-toggle" onclick="return toggle('ObjectCache');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="lastfm.objectcache.ObjectCache-class.html">ObjectCache</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ObjectCache-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="ObjectCache-expanded"><a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"> <tt class="py-docstring">"""The registry to contain all the entities"""</tt> </tt>
<a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"> <tt id="link-42" class="py-name" targets="Variable lastfm.objectcache.ObjectCache.keys=lastfm.objectcache.ObjectCache-class.html#keys"><a title="lastfm.objectcache.ObjectCache.keys" class="py-name" href="#" onclick="return doclink('link-42', 'keys', 'link-42');">keys</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt> <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt id="link-43" class="py-name"><a title="lastfm.album.Album" class="py-name" href="#" onclick="return doclink('link-43', 'Album', 'link-2');">Album</a></tt><tt class="py-op">,</tt> <tt id="link-44" class="py-name"><a title="lastfm.artist.Artist" class="py-name" href="#" onclick="return doclink('link-44', 'Artist', 'link-5');">Artist</a></tt><tt class="py-op">,</tt> <tt id="link-45" class="py-name"><a title="lastfm.event.Event" class="py-name" href="#" onclick="return doclink('link-45', 'Event', 'link-14');">Event</a></tt><tt class="py-op">,</tt> <tt id="link-46" class="py-name"><a title="lastfm.geo.Location" class="py-name" href="#" onclick="return doclink('link-46', 'Location', 'link-17');">Location</a></tt><tt class="py-op">,</tt> <tt id="link-47" class="py-name"><a title="lastfm.geo.Country" class="py-name" href="#" onclick="return doclink('link-47', 'Country', 'link-18');">Country</a></tt><tt class="py-op">,</tt> <tt id="link-48" class="py-name"><a title="lastfm.group.Group" class="py-name" href="#" onclick="return doclink('link-48', 'Group', 'link-21');">Group</a></tt><tt class="py-op">,</tt> </tt>
<a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"> <tt id="link-49" class="py-name"><a title="lastfm.playlist.Playlist
lastfm.user.User.Playlist" class="py-name" href="#" onclick="return doclink('link-49', 'Playlist', 'link-24');">Playlist</a></tt><tt class="py-op">,</tt> <tt id="link-50" class="py-name"><a title="lastfm.tag.Tag" class="py-name" href="#" onclick="return doclink('link-50', 'Tag', 'link-27');">Tag</a></tt><tt class="py-op">,</tt> <tt id="link-51" class="py-name"><a title="lastfm.track.Track" class="py-name" href="#" onclick="return doclink('link-51', 'Track', 'link-30');">Track</a></tt><tt class="py-op">,</tt> <tt id="link-52" class="py-name"><a title="lastfm.user.User" class="py-name" href="#" onclick="return doclink('link-52', 'User', 'link-33');">User</a></tt><tt class="py-op">,</tt> <tt id="link-53" class="py-name"><a title="lastfm.venue.Venue" class="py-name" href="#" onclick="return doclink('link-53', 'Venue', 'link-36');">Venue</a></tt><tt class="py-op">,</tt> <tt id="link-54" class="py-name"><a title="lastfm.weeklychart.WeeklyAlbumChart" class="py-name" href="#" onclick="return doclink('link-54', 'WeeklyAlbumChart', 'link-39');">WeeklyAlbumChart</a></tt><tt class="py-op">,</tt> <tt id="link-55" class="py-name"><a title="lastfm.weeklychart.WeeklyArtistChart" class="py-name" href="#" onclick="return doclink('link-55', 'WeeklyArtistChart', 'link-40');">WeeklyArtistChart</a></tt><tt class="py-op">,</tt> <tt id="link-56" class="py-name"><a title="lastfm.weeklychart.WeeklyTrackChart" class="py-name" href="#" onclick="return doclink('link-56', 'WeeklyTrackChart', 'link-41');">WeeklyTrackChart</a></tt><tt class="py-op">]</tt><tt class="py-op">]</tt> </tt>
<a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"> </tt>
<a name="ObjectCache.__getitem__"></a><div id="ObjectCache.__getitem__-def"><a name="L26"></a><tt class="py-lineno">26</tt> <a class="py-toggle" href="#" id="ObjectCache.__getitem__-toggle" onclick="return toggle('ObjectCache.__getitem__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lastfm.objectcache.ObjectCache-class.html#__getitem__">__getitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ObjectCache.__getitem__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="ObjectCache.__getitem__-expanded"><a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-57" class="py-name" targets="Variable lastfm.album.Album.name=lastfm.album.Album-class.html#name,Variable lastfm.artist.Artist.name=lastfm.artist.Artist-class.html#name,Variable lastfm.geo.Country.name=lastfm.geo.Country-class.html#name,Variable lastfm.group.Group.name=lastfm.group.Group-class.html#name,Variable lastfm.tag.Tag.name=lastfm.tag.Tag-class.html#name,Variable lastfm.track.Track.name=lastfm.track.Track-class.html#name,Variable lastfm.user.User.name=lastfm.user.User-class.html#name,Variable lastfm.venue.Venue.name=lastfm.venue.Venue-class.html#name"><a title="lastfm.album.Album.name
lastfm.artist.Artist.name
lastfm.geo.Country.name
lastfm.group.Group.name
lastfm.tag.Tag.name
lastfm.track.Track.name
lastfm.user.User.name
lastfm.venue.Venue.name" class="py-name" href="#" onclick="return doclink('link-57', 'name', 'link-57');">name</a></tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt id="link-58" class="py-name" targets="Class lastfm.objectcache.ObjectCache=lastfm.objectcache.ObjectCache-class.html"><a title="lastfm.objectcache.ObjectCache" class="py-name" href="#" onclick="return doclink('link-58', 'ObjectCache', 'link-58');">ObjectCache</a></tt><tt class="py-op">.</tt><tt id="link-59" class="py-name"><a title="lastfm.objectcache.ObjectCache.keys" class="py-name" href="#" onclick="return doclink('link-59', 'keys', 'link-42');">keys</a></tt><tt class="py-op">:</tt> </tt>
<a name="L28"></a><tt class="py-lineno">28</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-60" class="py-name"><a title="lastfm.error.InvalidParametersError" class="py-name" href="#" onclick="return doclink('link-60', 'InvalidParametersError', 'link-11');">InvalidParametersError</a></tt><tt class="py-op">(</tt><tt class="py-string">"Key does not correspond to a valid class"</tt><tt class="py-op">)</tt> </tt>
<a name="L29"></a><tt class="py-lineno">29</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"> <tt class="py-name">vals</tt> <tt class="py-op">=</tt> <tt id="link-61" class="py-name"><a title="lastfm.mixins.cacheable.Cacheable" class="py-name" href="#" onclick="return doclink('link-61', 'Cacheable', 'link-8');">Cacheable</a></tt><tt class="py-op">.</tt><tt id="link-62" class="py-name" targets="Variable lastfm.mixins.cacheable.Cacheable.registry=lastfm.mixins.cacheable.Cacheable-class.html#registry"><a title="lastfm.mixins.cacheable.Cacheable.registry" class="py-name" href="#" onclick="return doclink('link-62', 'registry', 'link-62');">registry</a></tt><tt class="py-op">[</tt><tt class="py-name">eval</tt><tt class="py-op">(</tt><tt id="link-63" class="py-name"><a title="lastfm.album.Album.name
lastfm.artist.Artist.name
lastfm.geo.Country.name
lastfm.group.Group.name
lastfm.tag.Tag.name
lastfm.track.Track.name
lastfm.user.User.name
lastfm.venue.Venue.name" class="py-name" href="#" onclick="return doclink('link-63', 'name', 'link-57');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">values</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt> <tt class="py-line"> <tt class="py-name">vals</tt><tt class="py-op">.</tt><tt id="link-64" class="py-name" targets="Method lastfm.safelist.SafeList.sort()=lastfm.safelist.SafeList-class.html#sort"><a title="lastfm.safelist.SafeList.sort" class="py-name" href="#" onclick="return doclink('link-64', 'sort', 'link-64');">sort</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">vals</tt> </tt>
<a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
<a name="L35"></a><tt class="py-lineno">35</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
</div><a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"> </tt>
<a name="ObjectCache.__repr__"></a><div id="ObjectCache.__repr__-def"><a name="L37"></a><tt class="py-lineno">37</tt> <a class="py-toggle" href="#" id="ObjectCache.__repr__-toggle" onclick="return toggle('ObjectCache.__repr__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lastfm.objectcache.ObjectCache-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ObjectCache.__repr__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="ObjectCache.__repr__-expanded"><a name="L38"></a><tt class="py-lineno">38</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">"&lt;lastfm.ObjectCache&gt;"</tt> </tt>
</div></div><a name="L39"></a><tt class="py-lineno">39</tt> <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="lastfm-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/python-lastfm/">python-lastfm</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Tue Mar 10 11:14:39 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>