lambda x, (y, z): x | (z << y) заменить на lambda x, yz: x | (yz[1] << yz[0]). Распаковка картежей в параметрах была убрана из python 3 в соответствии с PEP 3113. import requests
from xml.etree import ElementTree as ET
response = requests.get('http://site.com/api/', stream=True)
tree = ET.fromstring(response.content)
for currency in tree.findall('currency'):
title = currency.find('title_alias').text
print(title)
rates = currency.find('rates')
print('\tBuy: ' + rates.find('buy_rate').text)
print('\tSell: ' + rates.find('sell_rate').text) $('.multiple').on('change', 'input[value=""]', function() {
var i = 0;
var n = $('.file').length;
var items = n + 1;
$(this).attr("id",'contact_attachment' + items)
$('.multiple').prepend('<input class="btn-review file full " type="file" multiple name="contact_attachment1" id="contact_attachment " value=""/>');
}); $('#faf-filters-4 input').change(function() {
var alias = $(this).data('alias');
$('fieldset').not('#faf-filters-4').find('input').each(function() {
$(this).prop('disabled', true);
});
switch(alias) {
case 'kvartira':
$('#faf-filters-5 input').each(function() {
$(this).prop('disabled', false);
});
break;
...
}
});$('fieldset[data-alias="' + alias + '"] input').each(function() {
$(this).prop('disabled', false);
});