если вы передаете все аргументы напрямую, вы можете утверждать, что вам следует просто использовать *args
.
def http_get(*args):
with urllib.request.urlopen(*args) as w:
return w.read()
http_post = http_get
Как насчет:
const string xmlNamespace = "{http://schemas.microsoft.com/developer/msbuild/2003}";
return from projectPath in projectPaths
let xml = XDocument.Load(projectPath)
let dir = Path.GetDirectoryName(projectPath)
from c in xml.Descendants(xmlNamespace + "Compile")
where c.Attribute("Include").Value.EndsWith(".cs")
select Path.Combine(dir, c.Attribute("Include").Value);