ここでは、正の整数を引数に取る関数で可能な実装の1つを示す：

```
def sieve_of_eratosthenes(n)：
  number = list(range(2, n + 1))
  primes = []
  while numbers：
    prime = numbers.pop(0)
    primes.append(prime)
    numbers = [num for num in numbers if num % prime != 0].
  return primes
```
Here is one possible implementation with a function that takes a positive integer as an argument:
def sieve_of_eratosthenes(n):
  numbers = list(range(2, n + 1))
  primes = []
  while numbers:
    prime = numbers.pop(0)
    primes.append(prime)
    numbers = [num for num in numbers if num % prime != 0]
  return primes