# Syntax: use "^" instead of "\*\*" AND syntax: "^" is not a unary operator

**URL:** <https://discourse.julialang.org/t/syntax-use-instead-of-and-syntax-is-not-a-unary-operator/34258>\
**Category:** General Usage\
**Tags:** first-steps\
**Created:** [February 6, 2020, 4:19pm UTC](https://discourse.julialang.org/t/syntax-use-instead-of-and-syntax-is-not-a-unary-operator/34258 "2020-02-06T16:19:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aizzaac](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@Aizzaac](https://discourse.julialang.org/u/Aizzaac)\
**Post date:** [February 6, 2020, 4:19pm UTC](https://discourse.julialang.org/t/syntax-use-instead-of-and-syntax-is-not-a-unary-operator/34258/1 "2020-02-06T16:19:14Z")

</div>

Hi

I am translating Python into Julia.

When converting this python line into Julia I get an error.

```julia
oneshotsearch_results = service.jobs.oneshot(searchquery_oneshot, **kwargs_oneshot)

```

```julia
syntax: use "^" instead of "**"

```

So I modified it into this:

```julia
oneshotsearch_results = service.jobs.oneshot(searchquery_oneshot, ^^kwargs_oneshot)

```

Now the error is:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/c/f/cfc79b5a1b5b90ed2b7c2300a86b8d11c821007c.png)

My whole code is:

```julia
results=pyimport("splunklib.results")

kwargs_oneshot = (earliest_time= "2019-09-07T12:00:00.000-07:00",
                  latest_time= "2019-09-09T12:00:00.000-07:00",
                  count=0)

searchquery_oneshot = "search index=iis | stats count by c_ip | head 5" 

oneshotsearch_results = service.jobs.oneshot(searchquery_oneshot, **kwargs_oneshot)

# Get the results and display them using the ResultsReader
reader = results.ResultsReader(oneshotsearch_results)
for item in reader
    println(item)
end

```

Any insights?

---

<div class="post-metadata">

**Author:** ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Post date:** [February 6, 2020, 4:29pm UTC](https://discourse.julialang.org/t/syntax-use-instead-of-and-syntax-is-not-a-unary-operator/34258/2 "2020-02-06T16:29:32Z")

</div>

Use `...` for splatting

---

<div class="post-metadata">

**Author:** ![Aizzaac](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@Aizzaac](https://discourse.julialang.org/u/Aizzaac)\
**Post date:** [February 6, 2020, 4:39pm UTC](https://discourse.julialang.org/t/syntax-use-instead-of-and-syntax-is-not-a-unary-operator/34258/3 "2020-02-06T16:39:58Z")

</div>

It still does not work.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/3/0/30a3608a03035521653f6c1c5948a01b805813db.png)

---

<div class="post-metadata">

**Author:** ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Post date:** [February 6, 2020, 4:41pm UTC](https://discourse.julialang.org/t/syntax-use-instead-of-and-syntax-is-not-a-unary-operator/34258/4 "2020-02-06T16:41:55Z")

</div>

Hmm, actually probably needs a semicolon: `oneshot(searchquery_oneshot; kwargs_oneshot...)`. That way Julia knows they are keyword arguments, not positional ones

---

<div class="post-metadata">

**Author:** ![Aizzaac](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@Aizzaac](https://discourse.julialang.org/u/Aizzaac)\
**Post date:** [February 6, 2020, 4:49pm UTC](https://discourse.julialang.org/t/syntax-use-instead-of-and-syntax-is-not-a-unary-operator/34258/5 "2020-02-06T16:49:10Z")

</div>

Ok. I got a result this time.  
Is there like a “dictionary” or Cheatsheet to translate from Julia to Python or viceversa?

Anyways…  
These are my results in Python and in Julia.  
I want to put that into a dataframe (ex pandas). And visualize it in a map. As I have ipaddresses and latitude and longitude.

Do you have any suggestions?

IN PYTHON  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/6/5/6575abc8ce0c4df10520c84504c25374b03ecf9e.png)

IN JULIA  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/d/b/db6e5d28e60f0f183e5cf73cf4e4507ac8859261.png)

---

<div class="post-metadata">

**Author:** ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Post date:** [February 6, 2020, 4:52pm UTC](https://discourse.julialang.org/t/syntax-use-instead-of-and-syntax-is-not-a-unary-operator/34258/6 "2020-02-06T16:52:42Z")

</div>

I know of [https://cheatsheets.quantecon.org/](https://cheatsheets.quantecon.org/), but it doesn’t cover splatting. [Noteworthy Differences from other Languages · The Julia Language](https://docs.julialang.org/en/v1/manual/noteworthy-differences/#Noteworthy-differences-from-Python-1) is also helpful, as is the manual as a whole.

The dataframes package in Julia is DataFrames.jl. I know there have been other threads on discourse about mapping visualizations so you might have some luck searching. Best of luck!

---

<div class="post-metadata">

**Author:** ![ssfrr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ssfrr/32/3736_2.png) [@ssfrr](https://discourse.julialang.org/u/ssfrr)\
**Post date:** [February 6, 2020, 6:43pm UTC](https://discourse.julialang.org/t/syntax-use-instead-of-and-syntax-is-not-a-unary-operator/34258/7 "2020-02-06T18:43:39Z")

</div>

Yeah, it’s a little unfortunate that the error message leads you astray in the situation (It’s assuming you’re trying to use `**` for exponentiation, which is `^` in Julia).

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [February 8, 2020, 7:10pm UTC](https://discourse.julialang.org/t/syntax-use-instead-of-and-syntax-is-not-a-unary-operator/34258/8 "2020-02-08T19:10:10Z")

</div>

I’ve just made PR 34706 [improve error message for using \*\* by oscardssmith · Pull Request #34706 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/pull/34706) with an improvement to the error message.

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [February 16, 2020, 1:06am UTC](https://discourse.julialang.org/t/syntax-use-instead-of-and-syntax-is-not-a-unary-operator/34258/9 "2020-02-16T01:06:03Z")

</div>

Pr merged. It should end up in 1.5
