{"id":102913,"date":"2022-01-08T15:37:07","date_gmt":"2022-01-08T13:37:08","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/%d0%b2-3-6-%d0%bf%d1%80%d0%be%d1%82%d0%b5%d1%81%d1%82%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d0%bd%d0%bd%d1%8b%d1%85-python-%d1%80%d0%b5%d0%bf%d0%be%d0%b7%d0%b8%d1%82%d0%be%d1%80%d0%b8%d0%b5%d0%b2-%d0%b2%d1%8b"},"modified":"2022-01-08T15:37:07","modified_gmt":"2022-01-08T13:37:08","slug":"%d0%b2-3-6-%d0%bf%d1%80%d0%be%d1%82%d0%b5%d1%81%d1%82%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d0%bd%d0%bd%d1%8b%d1%85-python-%d1%80%d0%b5%d0%bf%d0%be%d0%b7%d0%b8%d1%82%d0%be%d1%80%d0%b8%d0%b5%d0%b2-%d0%b2%d1%8b","status":"publish","type":"post","link":"https:\/\/prohoster.info\/es\/blog\/news\/%d0%b2-3-6-%d0%bf%d1%80%d0%be%d1%82%d0%b5%d1%81%d1%82%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d0%bd%d0%bd%d1%8b%d1%85-python-%d1%80%d0%b5%d0%bf%d0%be%d0%b7%d0%b8%d1%82%d0%be%d1%80%d0%b8%d0%b5%d0%b2-%d0%b2%d1%8b","title":{"rendered":"En el 3.6% de los repositorios de Python probados se encontraron errores relacionados con comas faltantes.","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Se han publicado los resultados de un estudio sobre la susceptibilidad del c\u00f3digo en Python a errores relacionados con el uso incorrecto de comas en el c\u00f3digo. Los problemas se deben a que, al hacer enumeraciones, Python combina autom\u00e1ticamente las cadenas en una lista si no est\u00e1n separadas por comas, y trata el valor como una tupla si despu\u00e9s del valor sigue una coma. Tras realizar un an\u00e1lisis automatizado de 666 repositorios de GitHub con c\u00f3digo en Python, los investigadores encontraron posibles problemas con comas en el 5 % de los proyectos estudiados.      <\/p>\n<p>Una revisi\u00f3n manual posterior mostr\u00f3 que los errores reales solo estaban presentes en 24 repositorios (3.6%), mientras que el 1.4% restante eran falsos positivos (por ejemplo, una coma podr\u00eda haber sido omitida intencionadamente entre l\u00edneas para combinar rutas de archivos divididas en varias l\u00edneas, hashes largos, bloques HTML o expresiones SQL). Es notable que entre los 24 repositorios con errores reales se encontraran grandes proyectos como Tensorflow, Google V8, Sentry, Pydata xarray, rapidpro, django-colorfield y django-helpdesk. Adem\u00e1s, los problemas con las comas no son espec\u00edficos de Python y a menudo surgen en proyectos en C\/C++ (por ejemplo, correcciones recientes \u2014 LLVM, Mono, Tensorflow).        <\/p>\n<p>Principales tipos de errores estudiados:  <\/p>\n<ul>\n<li class=\"l\"> Una coma omitida accidentalmente en listas, tuplas y conjuntos, lo que lleva a la uni\u00f3n de cadenas en lugar de interpretarlas como valores separados. Por ejemplo, en Sentry se omiti\u00f3 una coma entre las cadenas \u00abreleases\u00bb y \u00abdiscover\u00bb en una lista, lo que result\u00f3 en la verificaci\u00f3n de un manejador inexistente \u00ab\/releasesdiscover\u00bb, en lugar de verificar por separado \u00ab\/releases\u00bb y \u00ab\/discover\u00bb.    <center><img decoding=\"async\" alt=\"En el 3.6% de los repositorios de Python probados se encontraron errores relacionados con comas faltantes.\" src=\"\/wp-content\/uploads\/2022\/01\/67b17b458cc6743b316dc67db72ed336.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/center>\n<p>Otro ejemplo \u2014 una coma omitida en rapidpro llev\u00f3 a la uni\u00f3n de dos reglas diferentes en la l\u00ednea 572:  <center><img decoding=\"async\" alt=\"En el 3.6% de los repositorios de Python probados se encontraron errores relacionados con comas faltantes.\" src=\"\/wp-content\/uploads\/2022\/01\/c2a9d6dbdde6965091b27217626ea6c9.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/center>      <\/p>\n<li class=\"l\"> Una coma omitida al final de la definici\u00f3n de una tupla de un solo elemento, lo que provoca que se asigne un tipo com\u00fan en lugar de una tupla durante la asignaci\u00f3n. Por ejemplo, la expresi\u00f3n \u00abvalues = (1,)\u00bb asignar\u00e1 a la variable una tupla de un solo elemento, pero \u00abvalues = (1)\u00bb asignar\u00e1 un tipo entero. Los par\u00e9ntesis en las asignaciones mencionadas no afectan la definici\u00f3n del tipo y son opcionales, mientras que la existencia de una tupla est\u00e1 determinada por el analizador solo en funci\u00f3n de la presencia de comas.           REST_FRAMEWORK = {         'DEFAULT_PERMISSION_CLASSES': (             'rest_framework.permissions.IsAuthenticated' # En lugar de una tupla se asignar\u00e1 una cadena.         )     }\n<li class=\"l\"> La situaci\u00f3n opuesta \u2014 comas adicionales al asignar. Si se deja accidentalmente una coma al final de una asignaci\u00f3n, se asignar\u00e1 una tupla como valor en lugar de un tipo normal (por ejemplo, si se especifica \u00abvalue = 1,\u00bb en lugar de \u00abvalue = 1\u00bb).      <\/ul>\n<p>Fuente: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=56470\">opennet.ru<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u044b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u0432\u0435\u0440\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u0434\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Python \u043e\u0448\u0438\u0431\u043a\u0430\u043c, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c \u0441 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0437\u0430\u043f\u044f\u0442\u044b\u0445 \u0432 \u043a\u043e\u0434\u0435. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u044b\u0437\u0432\u0430\u043d\u044b \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u0445 Python \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u044b \u0437\u0430\u043f\u044f\u0442\u043e\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u043a \u043a\u043e\u0440\u0442\u0435\u0436, \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043f\u044f\u0442\u0430\u044f. \u041f\u0440\u043e\u0432\u0435\u0434\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 666 GitHub-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u0441 \u043a\u043e\u0434\u043e\u043c \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Python, \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0438 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":102914,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-102913","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u044b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u0432\u0435\u0440\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u0434\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Python \u043e\u0448\u0438\u0431\u043a\u0430\u043c, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c \u0441 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0437\u0430\u043f\u044f\u0442\u044b\u0445 \u0432 \u043a\u043e\u0434\u0435.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/es\/blog\/news\/%d0%b2-3-6-%d0%bf%d1%80%d0%be%d1%82%d0%b5%d1%81%d1%82%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d0%bd%d0%bd%d1%8b%d1%85-python-%d1%80%d0%b5%d0%bf%d0%be%d0%b7%d0%b8%d1%82%d0%be%d1%80%d0%b8%d0%b5%d0%b2-%d0%b2%d1%8b\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"es_ES\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0412 3.6% \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 Python-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u044b \u043e\u0448\u0438\u0431\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u043c\u0438 \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u044b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u0432\u0435\u0440\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u0434\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Python \u043e\u0448\u0438\u0431\u043a\u0430\u043c, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c \u0441 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0437\u0430\u043f\u044f\u0442\u044b\u0445 \u0432 \u043a\u043e\u0434\u0435.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/es\/blog\/news\/%d0%b2-3-6-%d0%bf%d1%80%d0%be%d1%82%d0%b5%d1%81%d1%82%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d0%bd%d0%bd%d1%8b%d1%85-python-%d1%80%d0%b5%d0%bf%d0%be%d0%b7%d0%b8%d1%82%d0%be%d1%80%d0%b8%d0%b5%d0%b2-%d0%b2%d1%8b\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2022-01-08T13:37:08+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-01-08T13:37:08+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47El 3.6% de los repositorios de Python probados presentaron errores relacionados con comas faltantes | ProHoster","description":"Se publicaron los resultados de un estudio sobre la vulnerabilidad del c\u00f3digo en Python a errores relacionados con un uso incorrecto de las comas en el c\u00f3digo.","canonical_url":"https:\/\/prohoster.info\/es\/blog\/news\/%d0%b2-3-6-%d0%bf%d1%80%d0%be%d1%82%d0%b5%d1%81%d1%82%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d0%bd%d0%bd%d1%8b%d1%85-python-%d1%80%d0%b5%d0%bf%d0%be%d0%b7%d0%b8%d1%82%d0%be%d1%80%d0%b8%d0%b5%d0%b2-%d0%b2%d1%8b","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"es_ES","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0412 3.6% \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 Python-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u044b \u043e\u0448\u0438\u0431\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u043c\u0438 \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438 | ProHoster","og:description":"\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u044b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u0432\u0435\u0440\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u0434\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Python \u043e\u0448\u0438\u0431\u043a\u0430\u043c, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c \u0441 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0437\u0430\u043f\u044f\u0442\u044b\u0445 \u0432 \u043a\u043e\u0434\u0435.","og:url":"https:\/\/prohoster.info\/es\/blog\/news\/%d0%b2-3-6-%d0%bf%d1%80%d0%be%d1%82%d0%b5%d1%81%d1%82%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d0%bd%d0%bd%d1%8b%d1%85-python-%d1%80%d0%b5%d0%bf%d0%be%d0%b7%d0%b8%d1%82%d0%be%d1%80%d0%b8%d0%b5%d0%b2-%d0%b2%d1%8b","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2022-01-08T13:37:08+00:00","article:modified_time":"2022-01-08T13:37:08+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"102913","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2022-01-08 13:38:08","updated":"2022-09-27 19:56:56","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/posts\/102913","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/comments?post=102913"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/posts\/102913\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/media\/102914"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/media?parent=102913"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/categories?post=102913"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/tags?post=102913"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}