MCPcopy Index your code
hub / github.com/ronreiter/interactive-tutorials / languages

Method languages

ideone/__init__.py:284–308  ·  view source on GitHub ↗

Get a list of supported languages and cache it. Examples -------- >>> ideone_object.languages() {'error': 'OK', 'languages': {1: "C++ (gcc-4.3.4)", 2: "Pascal (gpc) (gpc 20070904)", ...

(self)

Source from the content-addressed store, hash-verified

282 return result_dict
283
284 def languages(self):
285 """
286 Get a list of supported languages and cache it.
287
288 Examples
289 --------
290
291 >>> ideone_object.languages()
292 {'error': 'OK',
293 'languages': {1: "C++ (gcc-4.3.4)",
294 2: "Pascal (gpc) (gpc 20070904)",
295 ...
296 ...
297 ...
298 125: "Falcon (falcon-0.9.6.6)"}}
299
300 """
301 if self._language_dict is None:
302 result = self.client.service.getLanguages(self.user, self.password)
303 result_dict = Ideone._transform_to_dict(result)
304 Ideone._handle_error(result_dict)
305 languages = result_dict['languages']
306 result_dict['languages'] = Ideone._collapse_language_array(languages)
307 self._language_dict = result_dict['languages']
308 return self._language_dict
309
310 def test(self):
311 """

Callers 1

Calls 3

_transform_to_dictMethod · 0.80
_handle_errorMethod · 0.80

Tested by

no test coverage detected