Questions tagged as 'python'

2
answers

Threads in python 3.4

Well, I'm having a hard time using threads, I need to do the following: I have several items to compare with a variable, but this comparison takes a while, so I would like to make several comparisons at the same time and if some comparison is...
asked by 15.04.2015 / 16:51
1
answer

How does dynamic typing work in Python 3.x?

I'm new to Python and I had a question when I solved Exercise 1001 of Uri Online (read A and B, assign sum to X and print), when writing the following code, I received concatenation: a = input() b = input() x = a + b print ("x = ", x) Whe...
asked by 19.06.2016 / 19:05
3
answers

Script to query external IP [closed]

How can I get the address of IP of the person who logged into my system? I searched Google and all I find are queries on third-party sites ( link , # Does anyone know of any links or scripts (PHP, Python, ...) that do this?     
asked by 29.06.2015 / 18:41
1
answer

What is the difference between the concept of static and dynamic typing and the concept of strongly and weakly typed? [duplicate]

There is some confusion about the concept of programming languages with static and dynamic typing and the concept of strongly and poorly typed programming languages. For example, by my understanding Python is a dynamic typed language...
asked by 06.11.2015 / 15:38
2
answers

What's the difference between namedtuple and NamedTuple?

The module documentation typing states that the two code snippets below are equivalent. Using typing.NamedTuple : from typing import NamedTuple class Employee(NamedTuple): name: str id: int Using collections.na...
asked by 08.06.2018 / 20:32
1
answer

Django 'bool' object has no attribute '_committed'

I have a field of type FileField and when I try to delete the contents of it, it returns me this error message: ´bool' object has no attribute '_committed' To upload normally, the problem is only when I try to remove the uploade...
asked by 11.02.2014 / 17:35
1
answer

How to make a sum in Lambda with recursive logic using successor and predecessor?

I'm trying to mount a Sum with recursion logic using only successor and predecessor in Lambda. But they are not getting ... In case: suc = λx.x+1 ant = λx.x-1 I've already done something like this: {λx.[λy.(x-1)+(y+1)][λy.(x-1)+(y+1)]...
asked by 23.11.2015 / 13:37
1
answer

Recursive function that simulates a number raised to a power

How to simulate raising a number to a power using recursion (and Python)? '     
asked by 06.01.2015 / 17:54
1
answer

Scraping with python

How to capture one or more sentences from a website with Python and / or regular expressions? I want everything that starts with <p>&#8220; e acabe com &#8221;</p> Example: <p>&#8220;frasefrasefrasefrasefr...
asked by 26.01.2015 / 23:47
1
answer

Python Chat - Errno 9 - Bad File Descriptor

I am developing (for study only) a code for a python chat, and I came across an error during the client-server communication, I would like some guidance about it, since I can not identify a solution. Here is the code and the image of the error....
asked by 22.11.2016 / 17:58